-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Prevent ArgvInput::getFirstArgument() from returning an option value #30277
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
Conversation
5076733
to
e4d4a92
Compare
Do we really need that logic? To me, an approach like #30244 will achieve the same with greater flexibility. |
I think yes, it fixes a real bug. ArrayInput does not suffer from this issue. |
how does this handle cases where multiple shortcut gets grouped together ? |
e4d4a92
to
46461e9
Compare
@stof in case the token is a short option (group), this checks that the last char of the token has a value and, if it has one, the next token is skipped. Just added a test + inline comment. |
Thank you @chalasr. |
…ning an option value (chalasr) This PR was merged into the 3.4 branch. Discussion ---------- [Console] Prevent ArgvInput::getFirstArgument() from returning an option value | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23343 | License | MIT | Doc PR | n/a Fixes the case where the passed input string contains no command name but one or more global (i.e. application-defined) options accepting values. Commits ------- 46461e9 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
Fixes the case where the passed input string contains no command name but one or more global (i.e. application-defined) options accepting values.