formulary: handle unreadable bottle formula.
This occurs for any formulae that use relative `require` to files that are inside of e.g. a tap to use abstract formulae.
This commit is contained in:
parent
7ee86cfe77
commit
83e2049636
@ -124,7 +124,15 @@ module Formulary
|
||||
|
||||
def get_formula(spec, **)
|
||||
contents = Utils::Bottles.formula_contents @bottle_filename, name: name
|
||||
formula = Formulary.from_contents name, @bottle_filename, contents, spec
|
||||
formula = begin
|
||||
Formulary.from_contents name, @bottle_filename, contents, spec
|
||||
rescue FormulaUnreadableError => e
|
||||
opoo <<-EOS.undent
|
||||
Unreadable formula in #{@bottle_filename}:
|
||||
#{e}
|
||||
EOS
|
||||
super
|
||||
end
|
||||
formula.local_bottle_path = @bottle_filename
|
||||
formula
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user