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
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
raise "Expecting the name of a keg or formula, eg:\n==> brew #{PRISTINE_ARGV.join ' '} wget" if args.empty?
|
||||||
return args
|
return args
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_kegs
|
def extract_kegs
|
||||||
require 'keg'
|
require 'keg'
|
||||||
kegs=extract_named_args.collect {|name| Keg.new name}
|
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
|
return kegs
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user