brew list foo should always error when foo is not installed

Fixes Homebrew/homebrew#36484.
This commit is contained in:
Jack Nagel 2015-02-03 20:26:57 -05:00
parent 79bde9c13b
commit 2bf409d888

View File

@ -8,7 +8,10 @@ module Homebrew
# Unbrewed uses the PREFIX, which will exist # Unbrewed uses the PREFIX, which will exist
# Things below use the CELLAR, which doesn't until the first formula is installed. # Things below use the CELLAR, which doesn't until the first formula is installed.
return unless HOMEBREW_CELLAR.exist? unless HOMEBREW_CELLAR.exist?
raise NoSuchKegError.new(ARGV.named.first) if ARGV.named.any?
return
end
if ARGV.include? '--pinned' or ARGV.include? '--versions' if ARGV.include? '--pinned' or ARGV.include? '--versions'
filtered_list filtered_list