Silently ignore FormulaUnavailableError in check_conflicts

If the formula name is in full-qualified name. Let's silently
ignore it as we don't care about things used in taps that aren't
currently tapped.

Closes Homebrew/homebrew#38089.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-03-27 23:51:52 +08:00
parent c46e2dc196
commit 1539fda3e8

View File

@ -192,8 +192,15 @@ class FormulaInstaller
return if ARGV.force?
conflicts = formula.conflicts.select do |c|
f = Formulary.factory(c.name)
f.linked_keg.exist? && f.opt_prefix.exist?
begin
f = Formulary.factory(c.name)
f.linked_keg.exist? && f.opt_prefix.exist?
rescue FormulaUnavailableError
raise unless c.name =~ HOMEBREW_TAP_FORMULA_REGEX
# If the formula name is in full-qualified name. Let's silently
# ignore it as we don't care about things used in taps that aren't
# currently tapped.
end
end
raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?