Fix incorrect error message for arguments with choices#237
Closed
fralik wants to merge 3 commits intomicrosoft:devfrom
fralik:choices_bug
Closed
Fix incorrect error message for arguments with choices#237fralik wants to merge 3 commits intomicrosoft:devfrom fralik:choices_bug
fralik wants to merge 3 commits intomicrosoft:devfrom
fralik:choices_bug
Conversation
added 2 commits
March 2, 2021 21:33
- If user provided an invalid value for an argument with a list of choices, then the error message will not indicate this. Rather it will indicate that cli command group is invalid. This is a quick fix and I am not sure that it doesn't break Knack. From my tests, this fix is better than removing overridden _check_value method.
…rror messages - This seems to be a better fix for the previous commit.
Member
|
@fralik, Thanks a lot for the contribution and this is a nice finding! The corresponding fix in Azure CLI is done by Azure/azure-cli#6636. The change is later backported to knack by #146, but the logic for invalid argument value handling got lost during the backporting. As the logic of |
This was referenced Mar 22, 2021
Member
|
I have created a new PR #244 based on your commits so that you can still get credit and become a contributor. Please kindly see if the new PR satisfies your needs. Thanks. |
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 #236