Merge pull request #13799 from apainintheneck/ignore-missing-unversioned-formula-after-rename
Ignore renamed formulae when checking for unversioned formulae
This commit is contained in:
commit
6def5fc53b
@ -52,14 +52,16 @@ module Homebrew
|
|||||||
|
|
||||||
def audit_file
|
def audit_file
|
||||||
if formula.core_formula? && @versioned_formula
|
if formula.core_formula? && @versioned_formula
|
||||||
|
unversioned_name = formula.name.gsub(/@.*$/, "")
|
||||||
|
|
||||||
|
# ignore when an unversioned formula doesn't exist after an explicit rename
|
||||||
|
return if formula.tap.formula_renames.key?(unversioned_name)
|
||||||
|
|
||||||
|
# build this ourselves as we want e.g. homebrew/core to be present
|
||||||
|
full_name = "#{formula.tap}/#{unversioned_name}"
|
||||||
|
|
||||||
unversioned_formula = begin
|
unversioned_formula = begin
|
||||||
# build this ourselves as we want e.g. homebrew/core to be present
|
Formulary.factory(full_name).path
|
||||||
full_name = if formula.tap
|
|
||||||
"#{formula.tap}/#{formula.name}"
|
|
||||||
else
|
|
||||||
formula.name
|
|
||||||
end
|
|
||||||
Formulary.factory(full_name.gsub(/@.*$/, "")).path
|
|
||||||
rescue FormulaUnavailableError, TapFormulaAmbiguityError,
|
rescue FormulaUnavailableError, TapFormulaAmbiguityError,
|
||||||
TapFormulaWithOldnameAmbiguityError
|
TapFormulaWithOldnameAmbiguityError
|
||||||
Pathname.new formula.path.to_s.gsub(/@.*\.rb$/, ".rb")
|
Pathname.new formula.path.to_s.gsub(/@.*\.rb$/, ".rb")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user