diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 9e518685f2..54292f513b 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]