formula: allow link_overwrite for old name too.

This commit is contained in:
Mike McQuaid 2020-07-06 09:23:04 +01:00 committed by GitHub
parent 5eae33b59d
commit 17ca7527f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1118,9 +1118,8 @@ class Formula
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
return false # this keg belongs to another formula return false # this keg belongs to another formula
else else
# this keg belongs to another formula # this keg belongs to another unrelated formula
# but it is not an alias return false unless (f.aliases + f.oldname).include?(keg.name)
return false unless f.aliases.include? keg.name
end end
end end
to_check = path.relative_path_from(HOMEBREW_PREFIX).to_s to_check = path.relative_path_from(HOMEBREW_PREFIX).to_s