Merge pull request #6531 from jpninanjohn/master

Show correct message when invalid arguments are passed to brew
This commit is contained in:
Mike McQuaid 2019-10-11 09:30:12 +01:00 committed by GitHub
commit 9e56a8625d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,9 +221,14 @@ module Cask
usage
return if @command.nil?
return if @command == "help" && @args.empty?
raise ArgumentError, "help does not take arguments."
if @command == "help"
return if @args.empty?
raise ArgumentError, "help does not take arguments." if @args.length
end
raise ArgumentError, "Unknown Cask command: #{command}"
end
def purpose