brew/Library/Homebrew/cmd/tap-unpin.rb
Mike McQuaid 7d26a61cc8
Deprecate tap pinning
Tap pinning is not used by Homebrew or the Homebrew maintainers so issues relating to pinned taps (#5418, #5796) don’t get fixed. Tap pinning does not work consistently or reliably and is conceptually confusing to encourage users to use fully-scoped user/tap/formula naming or avoid shadowing core tap formulae' names instead.
2019-04-01 15:07:50 +01:00

33 lines
632 B
Ruby

require "cli_parser"
module Homebrew
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
hide_from_man_page!
end
end
def tap_unpin
odeprecated "brew tap-pin user/tap",
"fully-scoped user/tap/formula naming"
tap_unpin_args.parse
ARGV.named.each do |name|
tap = Tap.fetch(name)
raise "unpinning #{tap} is not allowed" if tap.core_tap?
tap.unpin
ohai "Unpinned #{tap}"
end
end
end