test-bot: separate tap/core no formula handling.

`e.tap` calls the tap method which wants a block on
`FormulaUnavailableError` so the previous approach is 👎.
This commit is contained in:
Mike McQuaid 2016-09-07 12:47:21 +01:00
parent f9fe5b6798
commit 665c56538e

View File

@ -247,10 +247,15 @@ module Homebrew
def safe_formula_canonical_name(formula_name)
Formulary.factory(formula_name).full_name
rescue TapFormulaUnavailableError, FormulaUnavailableError => e
exception_tap = e.tap || CoreTap.instance
raise if exception_tap.installed?
test "brew", "tap", exception_tap.name
rescue TapFormulaUnavailableError => e
raise if e.tap.installed?
test "brew", "tap", e.tap.name
retry unless steps.last.failed?
onoe e
puts e.backtrace
rescue FormulaUnavailableError => e
raise if CoreTap.instance.installed?
test "brew", "tap", CoreTap.instance.name
retry unless steps.last.failed?
onoe e
puts e.backtrace