aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formulary.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-04-18 08:43:39 +0100
committerMike McQuaid2017-04-18 08:43:39 +0100
commit1330b7441676da82ae89591b5d60e2e3f7b8ebe2 (patch)
treefca0fa057bd11a34ef9bb9d41bcad230f641050e /Library/Homebrew/formulary.rb
parent417f49dd32bfe555b20f3f7d88e2739f6623991b (diff)
downloadbrew-1330b7441676da82ae89591b5d60e2e3f7b8ebe2.tar.bz2
install: don't search when formula is unreadable.
These formulae are detected as missing but exist in an unreadable form. Fixes #2485
Diffstat (limited to 'Library/Homebrew/formulary.rb')
-rw-r--r--Library/Homebrew/formulary.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 9401f57cb..f5e6a2eb9 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -210,6 +210,10 @@ module Formulary
def get_formula(spec, alias_path: nil)
super
+ rescue FormulaUnreadableError => e
+ raise TapFormulaUnreadableError.new(tap, name, e.formula_error), "", e.backtrace
+ rescue FormulaClassUnavailableError => e
+ raise TapFormulaClassUnavailableError.new(tap, name, e.path, e.class_name, e.class_list), "", e.backtrace
rescue FormulaUnavailableError => e
raise TapFormulaUnavailableError.new(tap, name), "", e.backtrace
end