aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli.rb
diff options
context:
space:
mode:
authorL. E. Segovia2017-10-20 10:35:13 -0300
committerL. E. Segovia2017-10-20 10:35:13 -0300
commitec92cf6498ffeabb32827e18408f155c92d4e3ca (patch)
tree688430ecf3f9224b15ed69d6a8918bbd79a4a3c3 /Library/Homebrew/cask/lib/hbc/cli.rb
parent16faf6fca94625988ebcd8e1419acda478b2ef52 (diff)
downloadbrew-ec92cf6498ffeabb32827e18408f155c92d4e3ca.tar.bz2
Print only the offending command instead of the whole Cask command
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index 437b0d72c..b2883334c 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -230,7 +230,8 @@ module Hbc
return if @command == "help" && @args.empty?
- raise ArgumentError, "Unknown command: #{@command} #{@args.join(" ")}"
+ unknown_command = @command == "help" ? @args.first : @command
+ raise ArgumentError, "Unknown command: #{unknown_command}"
end
def purpose