2019-04-17 18:25:08 +09:00
|
|
|
require "cli/parser"
|
2018-11-11 18:35:55 +05:30
|
|
|
|
2014-06-18 22:41:47 -05:00
|
|
|
module Homebrew
|
2016-09-26 01:44:51 +02:00
|
|
|
module_function
|
|
|
|
|
2018-11-11 18:35:55 +05:30
|
|
|
def untap_args
|
|
|
|
Homebrew::CLI::Parser.new do
|
|
|
|
usage_banner <<~EOS
|
|
|
|
`untap` <tap>
|
|
|
|
|
|
|
|
Remove a tapped repository.
|
|
|
|
EOS
|
|
|
|
switch :debug
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-03-02 20:28:54 +00:00
|
|
|
def untap
|
2018-11-11 18:35:55 +05:30
|
|
|
untap_args.parse
|
|
|
|
|
|
|
|
raise "Usage is `brew untap <tap-name>`" if args.remaining.empty?
|
2013-03-02 06:52:55 -05:00
|
|
|
|
2015-06-08 18:05:58 +08:00
|
|
|
ARGV.named.each do |tapname|
|
2015-12-07 14:11:04 +08:00
|
|
|
tap = Tap.fetch(tapname)
|
2016-04-02 21:33:38 +08:00
|
|
|
raise "untapping #{tap} is not allowed" if tap.core_tap?
|
2018-09-17 02:45:00 +02:00
|
|
|
|
2015-11-07 16:25:34 +08:00
|
|
|
tap.uninstall
|
2015-02-01 12:11:54 -05:00
|
|
|
end
|
2012-03-18 00:40:41 +00:00
|
|
|
end
|
2012-03-02 20:28:54 +00:00
|
|
|
end
|