aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-28 10:52:51 -0700
committerAdam Vandenberg2012-08-28 10:52:51 -0700
commitd68395724553323134bece6aaf32304ca46f5e47 (patch)
tree5414728b5ca0cfea7e0f5fb467620997067e063a
parentd57a6d399fcca94377d76346c59da246f67af609 (diff)
downloadhomebrew-d68395724553323134bece6aaf32304ca46f5e47.tar.bz2
brew list: check for Cellar
If the Cellar doesn't exist yet, don't print an error message or exit with an error status. Fixes #14503.
-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]