-
Notifications
You must be signed in to change notification settings - Fork 992
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
Make booleans work in config files #223
Conversation
I realised my original fix doesn't work when you want to override a boolean in the config from the cli. |
Thanks @sgentle! I will try to take a look at this today. I'd like to get PR 222 settled before merging others, but hopefully that will be soon. |
Looks pretty good to me. The only potentially undesirable side-effect I have noticed is that the We obviously don't have this problem with the current version of yargs, but that's only because it ignores all boolean arguments defined in a config file, as you've found. I think this is an acceptable oddity, but I'd rather defer to @bcoe's judgment. @bcoe Thoughts? Seems to be a case of "you get what you ask for" to me. Otherwise, we'd have to update the parser to have knowledge of the |
I'll review and merge for early tomorrow. Love the fix, and nothing bad jumps out at me, but I'm always especially careful in code that touches the parser. |
see #226 |
@sgentle I've published this to the next branch of yargs:
Give this a shot, and let me know if it does the trick for you. |
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1, so bump yargs to 3.32.0
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1, so bump yargs to 3.32.0
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1, so bump yargs to 3.32.0
Due to yargs/yargs#223, using booleans in the config file doesn't work if `npm install` picks up a version of yargs lower than 3.18.1, so bump yargs to 3.32.0
Hi there,
Booleans don't seem to be working in config files. I added a test and a potential fix, but I'm not sure if it's the best way to proceed. Happy for feedback!