-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalidate nested command with no valid subcommands #9495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ho boy that seems like such an obvious miss. Thanks for fixing this!
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448 (cherry picked from commit 28da6c4)
Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448 (cherry picked from commit 28da6c4)
🎉 Handy links: |
🎉 Handy links: |
Currently, when loading command with sub-commands that fail to parse,
we result with command that:
The commit contains a few changes:
a command if all its sub-commands failed to parse
hacky, due to the hack that was there previously)
When such command is passed to a dispatch we crash with NPE.
Closes #9448