aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-08-02 01:21:01 +0100
committerMax Howell2009-08-02 01:21:01 +0100
commitd209998e390f7a2a2f86a7f4cf9b91c58b31eb01 (patch)
treea057c9acb66798f246c41036493e446630c2fd04
parentde87b6b81665e3ddbec616bee8970a62da40f38d (diff)
downloadhomebrew-d209998e390f7a2a2f86a7f4cf9b91c58b31eb01.tar.bz2
Raise if extract_named_args finds no named args
This errors out correctly for all existing and future usage.
-rwxr-xr-xbin/brew2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index 2b5fd7009..728af01a3 100755
--- a/bin/brew
+++ b/bin/brew
@@ -51,13 +51,13 @@ def extract_named_args
true
end
end
+ raise "Expecting the name of a keg or formula, eg:\n==> brew #{PRISTINE_ARGV.join ' '} wget" if args.empty?
return args
end
def extract_kegs
require 'keg'
kegs=extract_named_args.collect {|name| Keg.new name}
- raise "Expecting the name of a keg or formula, eg:\n==> brew #{PRISTINE_ARGV.join ' '} wget" if kegs.empty?
return kegs
end