formulary: fall back on missing bottle formula.
These aren't available on old macOS version bottles.
This commit is contained in:
parent
95b44eab49
commit
1942e60a37
@ -192,8 +192,8 @@ module Formulary
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_formula(spec, force_bottle: false, flags: [], **)
|
def get_formula(spec, force_bottle: false, flags: [], **)
|
||||||
contents = Utils::Bottles.formula_contents @bottle_filename, name: name
|
|
||||||
formula = begin
|
formula = begin
|
||||||
|
contents = Utils::Bottles.formula_contents @bottle_filename, name: name
|
||||||
Formulary.from_contents(name, path, contents, spec, force_bottle: force_bottle, flags: flags)
|
Formulary.from_contents(name, path, contents, spec, force_bottle: force_bottle, flags: flags)
|
||||||
rescue FormulaUnreadableError => e
|
rescue FormulaUnreadableError => e
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
@ -201,6 +201,12 @@ module Formulary
|
|||||||
#{e}
|
#{e}
|
||||||
EOS
|
EOS
|
||||||
super
|
super
|
||||||
|
rescue BottleFormulaUnavailableError => e
|
||||||
|
opoo <<~EOS
|
||||||
|
#{e}
|
||||||
|
Falling back to non-bottle formula.
|
||||||
|
EOS
|
||||||
|
super
|
||||||
end
|
end
|
||||||
formula.local_bottle_path = @bottle_filename
|
formula.local_bottle_path = @bottle_filename
|
||||||
formula
|
formula
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user