Skip to content
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

unknown --option=value arg split when defaultOption set #68

Closed
75lb opened this issue Dec 4, 2017 · 1 comment
Closed

unknown --option=value arg split when defaultOption set #68

75lb opened this issue Dec 4, 2017 · 1 comment

Comments

@75lb
Copy link
Owner

75lb commented Dec 4, 2017

This example correctly returns the --two=3 arg as an _unknown but the string is split into '--two' and '3'.

> const definitions = [ { name: 'file', type: String, defaultOption: true } ]
> commandLineArgs(definitions, { partial: true, argv: [ 'file', '--two=3' ] })
{ file: 'file', _unknown: [ '--two', '3' ] }

This issue is typically harmless as --two=3 and --two 3 are interchangeable. However, the correct output should be:

{ file: 'file', _unknown: [ '--two=3' ] }
@75lb 75lb added this to the next milestone Dec 4, 2017
@75lb 75lb mentioned this issue Dec 4, 2017
@75lb
Copy link
Owner Author

75lb commented Jan 17, 2018

Fixed in v5.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant