You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.3.0, it seems that the command cannot be executed if the command name includes hyphen.
class Test < Thor
desc "foo-bar", "an example task"
def foo_bar
puts "I'm a thor task!"
end
end
$ bundle exec thor test:foo-bar
Commands:
thor test:foo-bar # an example task
thor test:help [COMMAND] # Describe available commands or one specific command
Up to 1.2.2, the command was executed as intended.
$ bundle exec thor test:foo-bar
I'm a thor task!
Is this a feature change?
Looking at the change history, I can't find any related issues.
The text was updated successfully, but these errors were encountered:
naomichi-y
changed the title
`Commands that contain hyphens cannot be executed
Commands that contain hyphens cannot be executed
Jan 14, 2024
This is probably caused by Thor::Base.subclasses.detect not finding foo-bar.
By converting to command.tr('-', '_'), the behavior is the same as up to 1.2.2.
In 1.3.0, it seems that the command cannot be executed if the command name includes hyphen.
Up to 1.2.2, the command was executed as intended.
Is this a feature change?
Looking at the change history, I can't find any related issues.
The text was updated successfully, but these errors were encountered: