aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2013-06-29 21:35:57 -0500
committerJack Nagel2013-06-29 21:36:04 -0500
commit5b75c73df6ff868136831084b5e016f125e8a981 (patch)
tree554147350b2ded244a2b6a85f2a39ccbdac2f3c5 /Library/Homebrew/formula.rb
parent936f9487b1766c76d39d47cc12d40db6a5b79d31 (diff)
downloadbrew-5b75c73df6ff868136831084b5e016f125e8a981.tar.bz2
Do this in a saner way
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index dbd31fade..0135726ac 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -350,8 +350,12 @@ class Formula
end
def self.installed
- # `rescue nil` is here to skip kegs with no corresponding formulae
- HOMEBREW_CELLAR.children.map{ |rack| factory(rack.basename.to_s) rescue nil }.compact
+ HOMEBREW_CELLAR.children.map do |rack|
+ begin
+ factory(rack.basename.to_s)
+ rescue FormulaUnavailableError
+ end
+ end.compact
end
def self.aliases