fix #35
This commit is contained in:
@@ -120,6 +120,7 @@ class Homesick
|
|||||||
say_status :conflict, "#{destination} exists", :red unless options[:quiet]
|
say_status :conflict, "#{destination} exists", :red unless options[:quiet]
|
||||||
|
|
||||||
if options[:force] || shell.file_collision(destination) { source }
|
if options[:force] || shell.file_collision(destination) { source }
|
||||||
|
system "rm -rf #{destination}" unless options[:pretend]
|
||||||
system "ln -sf #{source} #{destination}" unless options[:pretend]
|
system "ln -sf #{source} #{destination}" unless options[:pretend]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -120,6 +120,17 @@ describe "homesick" do
|
|||||||
|
|
||||||
existing_dotdir_link.readlink.should == dotdir
|
existing_dotdir_link.readlink.should == dotdir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "can override existing directory" do
|
||||||
|
somewhere_else = create_construct
|
||||||
|
existing_dotdir = home.directory(".vim")
|
||||||
|
|
||||||
|
dotdir = castle.directory(".vim")
|
||||||
|
|
||||||
|
homesick.symlink("glencairn")
|
||||||
|
|
||||||
|
existing_dotdir.readlink.should == dotdir
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with '.config' in .homesick_subdir" do
|
context "with '.config' in .homesick_subdir" do
|
||||||
|
|||||||
Reference in New Issue
Block a user