class Thor::Group
def handle_argument_error(task, error, arity=nil) #:nodoc:
def handle_argument_error(task, error, arity=nil) #:nodoc: if arity > 0 msg = "#{basename} #{task.name} takes #{arity} argument" msg << "s" if arity > 1 msg << ", but it should not." else msg = "You should not pass arguments to #{basename} #{task.name}." end raise error, msg end