-
Notifications
You must be signed in to change notification settings - Fork 291
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
Required bool is not seen #413
Comments
Hi @ChangePlaces what does your options class look like? |
The single bool --usecache isn't recognised. I've stripped additional comments and the like.
|
Thanks, I understand the problem now. Boolean options do not support "values" aka e.g.
will set it to true. Leaving the value off will set it to false. As you've noticed, that doesn't play well with The 1.9.* branch not under active development, and therefore will not be fixed, but the author has indicated in #133 and #158 that it's something we want in 2.x. |
ahh thanks for getting back to me. i understand now! it's at least some relief to understand the logic behind it! I suppose a quick (untested) workaround may be to use an int instead of bool? 0 to indicate false and vice versa. |
Yep! You could use a string, too, and implement your own validation if you wanted, but still have to deal with strings :( |
I have a config with a required bool field, and I get the error that it isn't inlcuded, when it clearly is. I have tried
--thefield=false / --thefield=0 / --thefield=f
-version 1.9.71 from nuget
The text was updated successfully, but these errors were encountered: