Raise if extract_named_args finds no named args

This errors out correctly for all existing and future usage.
This commit is contained in:
Max Howell 2009-08-02 01:21:01 +01:00
parent 9b1cc903a2
commit e5fd9be0dc

View File

@ -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