A more helpful error message for brew untap

`brew untap` without arguments currently errors out (as it should), but the
error message is generic and unhelpful. (The error message is borrowed from
a method in the tap command - `tap_args`.)

Closes Homebrew/homebrew#18186.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Peter Aronoff 2013-03-02 06:52:55 -05:00 committed by Mike McQuaid
parent c8335d9c46
commit 00ef4b7fcb

View File

@ -2,6 +2,8 @@ require 'cmd/tap' # for tap_args
module Homebrew extend self
def untap
raise "Usage is `brew untap <tap-name>`" if ARGV.empty?
user, repo = tap_args
# we consistently downcase in tap to ensure we are not bitten by case-insensive