untap: Handle multiple arguments

Closes Homebrew/homebrew#36436.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
chdiza 2015-02-01 12:11:54 -05:00 committed by Mike McQuaid
parent 8a707ebb2b
commit 5e854164a7
2 changed files with 19 additions and 17 deletions

View File

@ -108,8 +108,8 @@ module Homebrew
end
end
def tap_args
ARGV.first =~ HOMEBREW_TAP_ARGS_REGEX
def tap_args(tap_name=ARGV.first)
tap_name =~ HOMEBREW_TAP_ARGS_REGEX
raise "Invalid tap name" unless $1 && $3
[$1, $3]
end

View File

@ -4,7 +4,8 @@ module Homebrew
def untap
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
# filesystem issues. Which is the default on mac. The problem being the
@ -24,6 +25,7 @@ module Homebrew
tapd.dirname.rmdir_if_possible
puts "Untapped #{files.length} formula#{plural(files.length, 'e')}"
end
end
def unlink_tap_formula paths
untapped = 0