untap: Handle multiple arguments
Closes Homebrew/homebrew#36436. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
8a707ebb2b
commit
5e854164a7
@ -108,8 +108,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tap_args
|
def tap_args(tap_name=ARGV.first)
|
||||||
ARGV.first =~ HOMEBREW_TAP_ARGS_REGEX
|
tap_name =~ HOMEBREW_TAP_ARGS_REGEX
|
||||||
raise "Invalid tap name" unless $1 && $3
|
raise "Invalid tap name" unless $1 && $3
|
||||||
[$1, $3]
|
[$1, $3]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -4,7 +4,8 @@ module Homebrew
|
|||||||
def untap
|
def untap
|
||||||
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
|
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
|
||||||
|
|
||||||
user, repo = tap_args
|
ARGV.each do |tapname|
|
||||||
|
user, repo = tap_args(tapname)
|
||||||
|
|
||||||
# we consistently downcase in tap to ensure we are not bitten by case-insensive
|
# we consistently downcase in tap to ensure we are not bitten by case-insensive
|
||||||
# filesystem issues. Which is the default on mac. The problem being the
|
# filesystem issues. Which is the default on mac. The problem being the
|
||||||
@ -24,6 +25,7 @@ module Homebrew
|
|||||||
tapd.dirname.rmdir_if_possible
|
tapd.dirname.rmdir_if_possible
|
||||||
puts "Untapped #{files.length} formula#{plural(files.length, 'e')}"
|
puts "Untapped #{files.length} formula#{plural(files.length, 'e')}"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def unlink_tap_formula paths
|
def unlink_tap_formula paths
|
||||||
untapped = 0
|
untapped = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user