Skip to content

Commit 198865a

Browse files
jcangassferik
authored andcommitted
Update invocation.rb
when calling invoke with a bad name, raise "Missing Thor class for invoke #{name}"
1 parent 0631d7d commit 198865a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/thor/invocation.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def invoke(name = nil, *args)
103103
command, args, opts, config = args
104104

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

108109
args, opts, config = _parse_initialization_options(args, opts, config)

0 commit comments

Comments
 (0)