aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-24 20:54:24 +0200
committerGitHub2017-10-24 20:54:24 +0200
commit632fdca2d4f2c3b82b1799bbf953a95875c87b3d (patch)
treed9493e4ff8090c9f674a33541269be5feb9a8425 /Library/Homebrew/cask/lib/hbc/cli.rb
parentcd61430bad2581ad7c92c4037b0c5deab84b3693 (diff)
parent09e26b1152cb66f0f1914f09a629c27a9e112b19 (diff)
downloadbrew-632fdca2d4f2c3b82b1799bbf953a95875c87b3d.tar.bz2
Merge pull request #3306 from amyspark/hacktoberfest-quash-cask-help
Fixes querying Cask commands' help
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index 9283802d5..e147c8280 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -154,7 +154,7 @@ module Hbc
def run
command_name, *args = detect_command_and_arguments(*@args)
command = if help?
- args.unshift(command_name)
+ args.unshift(command_name) unless command_name.nil?
"help"
else
self.class.lookup_command(command_name)
@@ -230,8 +230,7 @@ module Hbc
return if @command == "help" && @args.empty?
- unknown_command = @args.empty? ? @command : @args.first
- raise ArgumentError, "Unknown command: #{unknown_command}"
+ raise ArgumentError, "help does not take arguments."
end
def purpose