Actually check that the command name was set before adding it to args

This commit is contained in:
L. E. Segovia 2017-10-21 15:43:20 -03:00
parent 10cbc77af9
commit a8ee54a35f

View File

@ -154,7 +154,7 @@ module Hbc
def run def run
command_name, *args = detect_command_and_arguments(*@args) command_name, *args = detect_command_and_arguments(*@args)
command = if help? command = if help?
args.unshift(command_name) unless command_name.nil args.unshift(command_name) unless command_name.nil?
"help" "help"
else else
self.class.lookup_command(command_name) self.class.lookup_command(command_name)