untap: Use CLI::Parser to parse args
This commit is contained in:
parent
b0f382c177
commit
e70df22acd
@ -1,11 +1,26 @@
|
||||
#: * `untap` <tap>:
|
||||
#: Remove a tapped repository.
|
||||
|
||||
require "cli_parser"
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
def untap_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
usage_banner <<~EOS
|
||||
`untap` <tap>
|
||||
|
||||
Remove a tapped repository.
|
||||
EOS
|
||||
switch :debug
|
||||
end
|
||||
end
|
||||
|
||||
def untap
|
||||
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
|
||||
untap_args.parse
|
||||
|
||||
raise "Usage is `brew untap <tap-name>`" if args.remaining.empty?
|
||||
|
||||
ARGV.named.each do |tapname|
|
||||
tap = Tap.fetch(tapname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user