Don't overwrite silently on symlink conflicts

Symlink conflicts are now handled in similar fashion as normal
file-conflicts.
This commit is contained in:
Jacek Sowiński
2017-03-17 19:16:40 +01:00
parent c5b24b9b38
commit 85f46e01b1

View File

@@ -68,8 +68,10 @@ module Homesick
"#{destination} exists and points to #{destination.readlink}",
:red
if collision_accepted?(destination, source)
FileUtils.rm destination
FileUtils.ln_s source, destination, force: true unless options[:pretend]
end
when :conflict
say_status :conflict, "#{destination} exists", :red