diff options
| author | Mike McQuaid | 2017-10-04 10:14:06 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2017-10-04 10:14:06 +0100 | 
| commit | 83e2049636d023f8181badf844171fe4f9e5a29f (patch) | |
| tree | 09a9d1ad0b63488b11936be0e55e4ffa059cf3a3 | |
| parent | 7ee86cfe770bc19bf65509abf948ce363de90c59 (diff) | |
| download | brew-83e2049636d023f8181badf844171fe4f9e5a29f.tar.bz2 | |
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.
| -rw-r--r-- | Library/Homebrew/formulary.rb | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index c8ab8a922..0eb34ee2a 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -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 | 
