aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-28 10:52:51 -0700
committerAdam Vandenberg2012-08-28 10:52:51 -0700
commit516041dba8638c79fd5bdfe9c1218f5851f081e4 (patch)
tree44ed7ee75dae075d63bf843b30309f15f50b0975 /Library
parent396ca3fc590ff1e8e5c6fb784458d7a5a5162b00 (diff)
downloadbrew-516041dba8638c79fd5bdfe9c1218f5851f081e4.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 Homebrew/homebrew#14503.
Diffstat (limited to 'Library')
-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]