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

Array of camel-cased option with ConfigObjects #196

Closed
juergba opened this issue Aug 14, 2019 · 0 comments · Fixed by #199
Closed

Array of camel-cased option with ConfigObjects #196

juergba opened this issue Aug 14, 2019 · 0 comments · Fixed by #199

Comments

@juergba
Copy link
Contributor

juergba commented Aug 14, 2019

var args = parse('--watchFiles path1 --watchFiles path2', {
    array: ['watch-files'],
    configObjects: [{'watchFiles': 'path3'}],
    configuration: {
        'combine-arrays': true,
        'camel-case-expansion': true
    }
})
console.log(args); 
// { _: [], watchFiles: [ 'path1', 'path2' ], 'watch-files': [ 'path1', 'path2' ] }

The result is incorrect, it should be:

{ _: [],
  watchFiles: [ 'path1', 'path2', 'path3' ],
  'watch-files': [ 'path1', 'path2', 'path3' ] }

The input of --watchFiles is not recognised as the camel-cased version of --watch-files.

yargs-parser: v13.0.0 and also current master.

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

Successfully merging a pull request may close this issue.

1 participant