aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-08-10 19:56:28 -0500
committerJack Nagel2013-08-10 19:56:29 -0500
commit14dd61fc870ead5fdff887b1cbe876d916a87061 (patch)
treeb4e1a8d66025d3730dbb3dd7b483d1bf228d1dfe /Library
parent966e82663f5fda7b34ce144c74d87b8304488e05 (diff)
downloadbrew-14dd61fc870ead5fdff887b1cbe876d916a87061.tar.bz2
Check that the cellar exists in Formula.installed
Fixes Homebrew/homebrew#21741.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index e44a4cfb0..bb1d91687 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -355,6 +355,8 @@ class Formula
end
def self.installed
+ return [] unless HOMEBREW_CELLAR.directory?
+
HOMEBREW_CELLAR.children.map do |rack|
begin
factory(rack.basename.to_s)