mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Raise if extract_named_args finds no named args
This errors out correctly for all existing and future usage.
This commit is contained in:
parent
9b1cc903a2
commit
e5fd9be0dc
2
bin/brew
2
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user