Xu Cheng fa9a9ff5be tap-(un)pin/untap: better error message
Closes Homebrew/homebrew#49904.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-02 21:51:36 +08:00

14 lines
269 B
Ruby

require "tap"
module Homebrew
def untap
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
ARGV.named.each do |tapname|
tap = Tap.fetch(tapname)
raise "untapping #{tap} is not allowed" if tap.core_tap?
tap.uninstall
end
end
end