Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tap-unpin: Use CLI::Parser to parse args #5295

Merged
merged 1 commit into from
Nov 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions Library/Homebrew/cmd/tap-unpin.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
#: * `tap-unpin` <tap>:
#: Unpin <tap> so its formulae are no longer prioritized. See also `tap-pin`.

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 prioritized. See also `tap-pin`.
EOS
switch :debug
end
end

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?
Expand Down