lib/arli/cli/command_finder.rb in arli-0.9.0 vs lib/arli/cli/command_finder.rb in arli-1.0.0
- old
+ new
@@ -50,10 +50,10 @@
parser = factory.command_parser(cmd)
factory.parse_argv(parser, argv) if parser
end
def instantiate_command
- self.command_name = detect_command unless command_name
+ self.command_name ||= detect_command
begin
name = command_name.to_s.capitalize.to_sym
command_class = ::Arli::Commands.const_get(name)
raise_invalid_arli_command!(command_name) unless command_class
command_class.new(config: config) if command_class