aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-02-03 20:26:57 -0500
committerJack Nagel2015-02-03 20:26:57 -0500
commit2bf409d8885d73341557a168854c269882f2989a (patch)
treeaa6a0cdb4c8d5f65283f3fbf73f13a21862497a6 /Library
parent79bde9c13bf99c26e3053df468920c1eb1e8652c (diff)
downloadbrew-2bf409d8885d73341557a168854c269882f2989a.tar.bz2
`brew list foo` should always error when foo is not installed
Fixes Homebrew/homebrew#36484.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/list.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb
index 43d667dde..6dc0636dc 100644
--- a/Library/Homebrew/cmd/list.rb
+++ b/Library/Homebrew/cmd/list.rb
@@ -8,7 +8,10 @@ module Homebrew
# Unbrewed uses the PREFIX, which will exist
# 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'
filtered_list