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 with alias not working well #41

Closed
KohPoll opened this issue Aug 2, 2016 · 1 comment · Fixed by #43
Closed

array with alias not working well #41

KohPoll opened this issue Aug 2, 2016 · 1 comment · Fixed by #43

Comments

@KohPoll
Copy link

KohPoll commented Aug 2, 2016

// test.js
console.log(
  require('yargs-parser')(process.argv.slice(2), {
    'alias': {
      'f': 'files'
    },
    'array': ['files']
  })
);
node test.js -f  // -> output: { _: [], f: [ true ], files: [ true ] } (this is broken!)
node test.js --files // -> output: { _: [], files: [], f: [] }
node test.js -f -y // -> output: { _: [], f: [], files: [], y: true }
node test.js --files -y // -> output: { _: [], f: [], files: [], y: true }

I think it should be a bug...

@KohPoll
Copy link
Author

KohPoll commented Aug 2, 2016

forget the runtime env:

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