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
implies
behaves incorrectly on boolean options
#2372
Comments
Thanks for the clear example code and usage. The 17.1.0 behaviour is as intended. Default values are not treated specially here and since they set the option key, the implied option must also be set. The PR makes the behaviour consistent based on whether the option is set rather than depending on the option value.
|
Thanks for the info and good explanation about the default. I think I need to adjust my mindset as to how this applies to boolean values, can you please confirm if I'm on the right wavelength now? Before: "setting a flag X to true can make some additional arguments mandatory" Is there anything else in the API that supports conditionally mandatory arguments? Otherwise I'll just manually validate. |
To be clear, you can set the implied option (
No. You may get most of what you want if you simply omit the default value for However, |
An answer was provided, and no further activity in a month. Closing this as resolved. Feel free to open a new issue if it comes up again, with new information and renewed interest. |
As of
17.1.0
, the behavior ofimplies
on a boolean option is incorrect.On
17.1.0
running the script without the boolFlag gives the following:On
17.0.0
running the script without the boolFlag gives the following which is what I believe is correct:I think this is the PR where the defect was introduced: #1985
The text was updated successfully, but these errors were encountered: