test-bot: put exception, retry on missing formula.

This will be useful in debugging (and recovering from) the situation
where sometimes formulae can't be found when specifying multiple on the
command-line.
This commit is contained in:
Mike McQuaid 2016-09-07 08:42:00 +01:00
parent 4d123e6227
commit 159ba9b012

View File

@ -247,11 +247,13 @@ module Homebrew
def safe_formula_canonical_name(formula_name)
Formulary.factory(formula_name).full_name
rescue TapFormulaUnavailableError => e
rescue TapFormulaUnavailableError, FormulaUnavailableError => e
raise if e.tap.installed?
test "brew", "tap", e.tap.name
retry unless steps.last.failed?
rescue FormulaUnavailableError, TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError => e
onoe e
puts e.backtrace
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError => e
onoe e
puts e.backtrace
end