Correctly identify hyphenated and alias command names#878
Merged
Conversation
|
It worked correctly 👍 |
bastelfreak
added a commit
to bastelfreak/modulesync
that referenced
this pull request
May 17, 2024
With thor 1.3.1 we've two failing tests: ``` Failing Scenarios: cucumber features/execute.feature:36 # Scenario: Show fail-fast default value in help cucumber features/execute.feature:44 # Scenario: Override fail-fast default value using config file ``` as a workaround to get CI green again we'r pinning to 1.3.0. I think the bug is fixed in rails/thor#878 but not yet released.
|
hey people, any chance this can get reviewed and merged? This fixes CI errors in one of my projects, https://github.com/voxpupuli/modulesync. |
| # | ||
| # ==== Returns | ||
| # Boolean:: +true+ if the command exists, +false+ otherwise. | ||
| def command_exists?(command_name) |
Member
There was a problem hiding this comment.
Do we need this method in the public API? Should we :nodoc: it instead? I don't think we have a need to expose this to users.
Contributor
Author
There was a problem hiding this comment.
Thank you for reviewing. I added :nodoc:.
40ab451 to
3821657
Compare
|
@rafaelfranca thanks for the merge! Would it be possible to make a new release? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #868
Problem:
After version 1.3.0, invoking commands with hyphenated and alias names does not function as expected.
Given a Thor class definition as follows:
Each command results in the following.
This PR addresses the issue by implementing a fix in the
find_class_and_command_by_namespacemethod, ensuring that it correctly identifies both hyphenated command names and their aliases.