Skip to content

Commit

Permalink
Fix CocoaPods#36: --help --verbose shows stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
mrackwitz committed Jul 24, 2014
1 parent 68ebaee commit 49bb71a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/claide/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def initialize(argv)
# @return [void]
#
def validate!
help! if @argv.flag?('help')
banner! if @argv.flag?('help')
unless @argv.empty?
help! ValidationHelper.argument_suggestion(@argv.remainder, self.class)
end
Expand Down Expand Up @@ -466,6 +466,17 @@ def help!(error_message = nil)
invoked_command_class.help!(error_message)
end

# Print banner and exit
#
# @note Calling this method exits the current process.
#
# @return [void]
#
def banner!
puts invoked_command_class.banner
exit 0
end

#-------------------------------------------------------------------------#

# Handle deprecated form of self.arguments as an
Expand Down

0 comments on commit 49bb71a

Please sign in to comment.