add ARGV.value
This commit is contained in:
parent
702b5e5ba2
commit
d8d6b254f7
@ -67,6 +67,11 @@ module HomebrewArgvExtension
|
||||
at @n+1 or raise UsageError
|
||||
end
|
||||
|
||||
def value arg
|
||||
arg = find {|o| o =~ /--#{arg}=(.+)/}
|
||||
$1 if arg
|
||||
end
|
||||
|
||||
def force?
|
||||
flag? '--force'
|
||||
end
|
||||
@ -98,8 +103,7 @@ module HomebrewArgvExtension
|
||||
end
|
||||
|
||||
def json
|
||||
json_rev = find {|o| o =~ /--json=.+/}
|
||||
json_rev.split("=").last if json_rev
|
||||
value 'json'
|
||||
end
|
||||
|
||||
def build_head?
|
||||
|
Loading…
x
Reference in New Issue
Block a user