lib/gli/app_support.rb in gli-2.7.0 vs lib/gli/app_support.rb in gli-2.8.0
- old
+ new
@@ -206,10 +206,11 @@
def handle_exception(ex,command)
if regular_error_handling?(ex)
output_error_message(ex)
if ex.kind_of?(OptionParser::ParseError) || ex.kind_of?(BadCommandLine)
if commands[:help]
- commands[:help].execute({},{},command.nil? ? [] : [command.name.to_s])
+ command_for_help = command.nil? ? [] : command.name_for_help
+ commands[:help].execute({},{},command_for_help)
end
end
elsif ENV['GLI_DEBUG'] == 'true'
stderr.puts "Custom error handler exited false, skipping normal error handling"
end