Show correct message when invalid arguments are passed to brew

This commit is contained in:
Ninan John 2019-10-03 13:39:18 +05:30
parent 44eada21d5
commit aed6bc194d

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, "brew cask does not recognise this command"
end
def purpose