30 lines
508 B
Ruby
Raw Normal View History

2019-04-17 18:25:08 +09:00
require "cli/parser"
2018-11-11 18:35:55 +05:30
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?
2015-06-08 18:05:58 +08:00
ARGV.named.each do |tapname|
tap = Tap.fetch(tapname)
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
end
end
2012-03-02 20:28:54 +00:00
end