-
Notifications
You must be signed in to change notification settings - Fork 120
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
normalize seems to override coerce callback result #56
Labels
Comments
Hey, thanks for reporting! I suppose for now you can instead do something like this: var argv = yargs.option('source-dir', {
coerce: val => path.resolve(path.normalize(val))
}).argv; |
I think #57 squashed the bug found here |
@bcoe I'd say we add a part about the handling of objects in coercion to the readme at yargs when Greenkeeper sends a pull request for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that when the two property are combined,
normalize
overrides the coerced value with the normalized version of the original value of the option.Minimal nodejs snippet to reproduce the issue:
The text was updated successfully, but these errors were encountered: