aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/list.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb
index 9e518685f..54292f513 100644
--- a/Library/Homebrew/cmd/list.rb
+++ b/Library/Homebrew/cmd/list.rb
@@ -1,5 +1,8 @@
module Homebrew extend self
def list
+ # Cellar doesn't until the first formula is installed.
+ return unless HOMEBREW_CELLAR.exist?
+
if ARGV.flag? '--unbrewed'
dirs = HOMEBREW_PREFIX.children.select{ |pn| pn.directory? }.map{ |pn| pn.basename.to_s }
dirs -= %w[Library Cellar .git]