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.
This commit is contained in:
parent
396ca3fc59
commit
516041dba8
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user