cleanup: rescue TapFormulaAmbiguityError caused by Dependency#to_formula

Closes Homebrew/homebrew#40682.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-06-14 14:44:41 +08:00
parent 3ded175241
commit 74d99d647d

View File

@ -124,9 +124,11 @@ module Homebrew
true
elsif formula.opt_prefix.directory?
# SHA records were added to INSTALL_RECEIPTS the same day as opt symlinks
Formula.installed.
select { |f| f.deps.any? { |d| d.to_formula.full_name == formula.full_name } }.
all? { |f| f.rack.subdirs.all? { |keg| Tab.for_keg(keg).HEAD } }
Formula.installed.select do |f|
f.deps.any? do |d|
d.to_formula.full_name == formula.full_name rescue d.name == formula.name
end
end.all? { |f| f.rack.subdirs.all? { |keg| Tab.for_keg(keg).HEAD } }
end
end
end