Skip to content
Snippets Groups Projects
Commit 1e487edd authored by Xu Cheng's avatar Xu Cheng
Browse files

tap various commands: use tap name method.

Instead of hard coded `Homebrew/homebrew`
parent a3023c3c
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ module Homebrew
end
end
raise "Homebrew/homebrew is not allowed" if taps.any?(&:core_tap?)
raise "#{tap} is not allowed" if taps.any?(&:core_tap?)
if ARGV.json == "v1"
print_tap_json(taps)
......
......@@ -4,9 +4,9 @@ module Homebrew
def tap_pin
ARGV.named.each do |name|
tap = Tap.fetch(name)
raise "Homebrew/homebrew is not allowed" if tap.core_tap?
raise "#{tap} is not allowed" if tap.core_tap?
tap.pin
ohai "Pinned #{tap.name}"
ohai "Pinned #{tap}"
end
end
end
......@@ -4,9 +4,9 @@ module Homebrew
def tap_unpin
ARGV.named.each do |name|
tap = Tap.fetch(name)
raise "Homebrew/homebrew is not allowed" if tap.core_tap?
raise "#{tap} is not allowed" if tap.core_tap?
tap.unpin
ohai "Unpinned #{tap.name}"
ohai "Unpinned #{tap}"
end
end
end
......@@ -6,7 +6,7 @@ module Homebrew
ARGV.named.each do |tapname|
tap = Tap.fetch(tapname)
raise "Homebrew/homebrew is not allowed" if tap.core_tap?
raise "#{tap} is not allowed" if tap.core_tap?
tap.uninstall
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment