diff options
| author | Martin Afanasjew | 2016-04-16 21:07:07 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-04-17 21:16:01 +0200 |
| commit | 94a627d7aafb59107a0d94766585205a416114f0 (patch) | |
| tree | 8b86c7ca7a0c4034c3b6f2a77a4edcfccddf0974 /Library | |
| parent | c3076f0b6923f595f3d70eb849eeb8b0b204da3b (diff) | |
| download | brew-94a627d7aafb59107a0d94766585205a416114f0.tar.bz2 | |
install: handle FormulaClassUnavailableError
Don't search for alternatives if formula was found, but has issues, as
this will create confusing output, particularly for contributors working
on a formula file.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 30203a6f0..7e1edc237 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -139,6 +139,11 @@ module Homebrew perform_preinstall_checks formulae.each { |f| install_formula(f) } + rescue FormulaClassUnavailableError => e + # Need to rescue before `FormulaUnavailableError` (superclass of this) + # is handled, as searching for a formula doesn't make sense here (the + # formula was found, but there's a problem with its implementation). + ofail e.message rescue FormulaUnavailableError => e if (blacklist = blacklisted?(e.name)) ofail "#{e.message}\n#{blacklist}" |
