Skip to content

Commit

Permalink
Update invocation.rb
Browse files Browse the repository at this point in the history
when calling invoke with a bad name, raise "Missing Thor class for invoke #{name}"
  • Loading branch information
jcangas authored and sferik committed Dec 14, 2013
1 parent 0631d7d commit 198865a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/thor/invocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def invoke(name = nil, *args)
command, args, opts, config = args

klass, command = _retrieve_class_and_command(name, command)
fail "Missing Thor class for invoke #{name}" unless klass
fail "Expected Thor class, got #{klass}" unless klass <= Thor::Base

args, opts, config = _parse_initialization_options(args, opts, config)
Expand Down

0 comments on commit 198865a

Please sign in to comment.