tap-(un)pin/untap: better error message
Closes Homebrew/homebrew#49904. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
a47ea61f0b
commit
fa9a9ff5be
@ -4,7 +4,7 @@ module Homebrew
|
|||||||
def tap_pin
|
def tap_pin
|
||||||
ARGV.named.each do |name|
|
ARGV.named.each do |name|
|
||||||
tap = Tap.fetch(name)
|
tap = Tap.fetch(name)
|
||||||
raise "#{tap} is not allowed" if tap.core_tap?
|
raise "pinning #{tap} is not allowed" if tap.core_tap?
|
||||||
tap.pin
|
tap.pin
|
||||||
ohai "Pinned #{tap}"
|
ohai "Pinned #{tap}"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -4,7 +4,7 @@ module Homebrew
|
|||||||
def tap_unpin
|
def tap_unpin
|
||||||
ARGV.named.each do |name|
|
ARGV.named.each do |name|
|
||||||
tap = Tap.fetch(name)
|
tap = Tap.fetch(name)
|
||||||
raise "#{tap} is not allowed" if tap.core_tap?
|
raise "unpinning #{tap} is not allowed" if tap.core_tap?
|
||||||
tap.unpin
|
tap.unpin
|
||||||
ohai "Unpinned #{tap}"
|
ohai "Unpinned #{tap}"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -6,7 +6,7 @@ module Homebrew
|
|||||||
|
|
||||||
ARGV.named.each do |tapname|
|
ARGV.named.each do |tapname|
|
||||||
tap = Tap.fetch(tapname)
|
tap = Tap.fetch(tapname)
|
||||||
raise "#{tap} is not allowed" if tap.core_tap?
|
raise "untapping #{tap} is not allowed" if tap.core_tap?
|
||||||
tap.uninstall
|
tap.uninstall
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user