fix #35
This commit is contained in:
@@ -109,6 +109,7 @@ class Homesick
|
||||
say_status :conflict, "#{destination} exists", :red unless options[:quiet]
|
||||
|
||||
if options[:force] || shell.file_collision(destination) { source }
|
||||
system "rm -rf #{destination}" unless options[:pretend]
|
||||
system "ln -sf #{source} #{destination}" unless options[:pretend]
|
||||
end
|
||||
else
|
||||
|
||||
@@ -119,6 +119,17 @@ describe "homesick" do
|
||||
|
||||
existing_dotdir_link.readlink.should == dotdir
|
||||
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
|
||||
|
||||
context "with '.config' in .homesick_subdir" do
|
||||
|
||||
Reference in New Issue
Block a user