lib/clamp/subcommand/execution.rb in clamp-0.1.0 vs lib/clamp/subcommand/execution.rb in clamp-0.1.1
- old
+ new
@@ -4,15 +4,14 @@
module Execution
protected
def execute_subcommand
- signal_usage_error "no subcommand specified" if arguments.empty?
- subcommand_name = arguments.shift
+ signal_usage_error "no subcommand specified" unless subcommand_name
subcommand_class = find_subcommand_class(subcommand_name)
subcommand = subcommand_class.new("#{invocation_path} #{subcommand_name}", context)
subcommand.parent_command = self
- subcommand.run(arguments)
+ subcommand.run(subcommand_arguments)
end
private
def find_subcommand(name)