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
command_name, *args = detect_command_and_arguments(*@args)
command = if help?
args.unshift(command_name) unless command_name.nil
args.unshift(command_name) unless command_name.nil?
"help"
else
self.class.lookup_command(command_name)