aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-10-04 11:38:36 +0100
committerGitHub2017-10-04 11:38:36 +0100
commit113e5da55e630018cba9da19f4d3b268c2e7ee37 (patch)
tree37adbb4086976cf5487004affb97b759ea19acc8 /Library
parent0fbcbc7864655fb116b4d60bf143e06d51264e55 (diff)
parent83e2049636d023f8181badf844171fe4f9e5a29f (diff)
downloadbrew-113e5da55e630018cba9da19f4d3b268c2e7ee37.tar.bz2
Merge pull request #3263 from MikeMcQuaid/formulary-unreadable-bottle-formula
formulary: handle unreadable bottle formula.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb10
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