Merge pull request #7915 from iMichka/link

link_overwrite: allow to overwrite files from alias
This commit is contained in:
Mike McQuaid 2020-07-06 09:42:52 +01:00 committed by GitHub
commit f72328d9c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1112,13 +1112,14 @@ class Formula
return false if tab_tap.nil?
begin
Formulary.factory(keg.name)
f = Formulary.factory(keg.name)
rescue FormulaUnavailableError
# formula for this keg is deleted, so defer to allowlist
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
return false # this keg belongs to another formula
else
return false # this keg belongs to another formula
# this keg belongs to another unrelated formula
return false unless (f.aliases + f.oldname).include?(keg.name)
end
end
to_check = path.relative_path_from(HOMEBREW_PREFIX).to_s