Don't overwrite silently on symlink conflicts
Symlink conflicts are now handled in similar fashion as normal file-conflicts.
This commit is contained in:
@@ -68,8 +68,10 @@ module Homesick
|
|||||||
"#{destination} exists and points to #{destination.readlink}",
|
"#{destination} exists and points to #{destination.readlink}",
|
||||||
:red
|
:red
|
||||||
|
|
||||||
FileUtils.rm destination
|
if collision_accepted?(destination, source)
|
||||||
FileUtils.ln_s source, destination, force: true unless options[:pretend]
|
FileUtils.rm destination
|
||||||
|
FileUtils.ln_s source, destination, force: true unless options[:pretend]
|
||||||
|
end
|
||||||
when :conflict
|
when :conflict
|
||||||
say_status :conflict, "#{destination} exists", :red
|
say_status :conflict, "#{destination} exists", :red
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user