brew/Library/Homebrew/cmd/tap-unpin.rb

29 lines
519 B
Ruby
Raw Normal View History

require "cli_parser"
2015-08-09 22:42:46 +08:00
module Homebrew
2016-09-26 01:44:51 +02:00
module_function
def tap_unpin_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`tap-unpin` <tap>
Unpin <tap> so its formulae are no longer prioritised. See also `tap-pin`.
EOS
switch :debug
end
end
2015-08-09 22:42:46 +08:00
def tap_unpin
tap_unpin_args.parse
ARGV.named.each do |name|
tap = Tap.fetch(name)
raise "unpinning #{tap} is not allowed" if tap.core_tap?
2018-09-17 02:45:00 +02:00
2015-08-09 22:42:46 +08:00
tap.unpin
ohai "Unpinned #{tap}"
2015-08-09 22:42:46 +08:00
end
end
end