Revert "Keg: allow overwriting same-formula conflicts"
This commit is contained in:
parent
5dd47609f8
commit
17a073b6cc
@ -647,15 +647,6 @@ class Keg
|
|||||||
dst.delete if options[:overwrite] && (dst.exist? || dst.symlink?)
|
dst.delete if options[:overwrite] && (dst.exist? || dst.symlink?)
|
||||||
dst.make_relative_symlink(src)
|
dst.make_relative_symlink(src)
|
||||||
rescue Errno::EEXIST => e
|
rescue Errno::EEXIST => e
|
||||||
# Retry if we're linking a different version of the same
|
|
||||||
# formula. The `AlreadyLinkedError` above won't catch
|
|
||||||
# this if a formula is missing an optlink. In that case,
|
|
||||||
# delete the symlink and retry.
|
|
||||||
if dst.symlink? && dst.exist? && Keg.for(dst).name == name
|
|
||||||
dst.unlink
|
|
||||||
retry
|
|
||||||
end
|
|
||||||
|
|
||||||
raise ConflictError.new(self, src.relative_path_from(path), dst, e) if dst.exist?
|
raise ConflictError.new(self, src.relative_path_from(path), dst, e) if dst.exist?
|
||||||
|
|
||||||
if dst.symlink?
|
if dst.symlink?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user