Merge pull request #5304 from GauthamGoli/untap-args

untap: Use CLI::Parser to parse args
This commit is contained in:
Gautham Goli
2018-11-14 12:48:40 +05:30
committed by GitHub
+16 -1
View File
@@ -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)