From 1942e60a3703f8ceede2d9d4dafc9e8363bf2ef4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 1 Apr 2021 16:52:58 +0100 Subject: [PATCH] formulary: fall back on missing bottle formula. These aren't available on old macOS version bottles. --- Library/Homebrew/formulary.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 7c61238115..b6dfe53522 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -192,8 +192,8 @@ module Formulary end def get_formula(spec, force_bottle: false, flags: [], **) - contents = Utils::Bottles.formula_contents @bottle_filename, name: name formula = begin + contents = Utils::Bottles.formula_contents @bottle_filename, name: name Formulary.from_contents(name, path, contents, spec, force_bottle: force_bottle, flags: flags) rescue FormulaUnreadableError => e opoo <<~EOS @@ -201,6 +201,12 @@ module Formulary #{e} EOS super + rescue BottleFormulaUnavailableError => e + opoo <<~EOS + #{e} + Falling back to non-bottle formula. + EOS + super end formula.local_bottle_path = @bottle_filename formula