Revert "Keg: allow overwriting same-formula conflicts"

This commit is contained in:
Mike McQuaid 2021-01-14 10:02:33 +00:00
parent 5dd47609f8
commit 17a073b6cc
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -647,15 +647,6 @@ class Keg
dst.delete if options[:overwrite] && (dst.exist? || dst.symlink?)
dst.make_relative_symlink(src)
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?
if dst.symlink?