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

strictOptions with 'strip-aliased' doesn't work with a capitalize option #315

Closed
fcastilloec opened this issue Sep 8, 2020 · 1 comment · Fixed by #316
Closed

strictOptions with 'strip-aliased' doesn't work with a capitalize option #315

fcastilloec opened this issue Sep 8, 2020 · 1 comment · Fixed by #316
Labels

Comments

@fcastilloec
Copy link

As reported in yargs/yargs#1701, using yargs@next with the new strictOptions is not working correctly when using a capitalize alias and setting parserConfiguration({ 'strip-aliased': true }). Here's some working code to reproduce the bug:

yargs(['foo', '-a'])
  .parserConfiguration({ 'strip-aliased': true })
  .strictOptions()
  .option('and', { alias: 'A' })
  .parse();

If you set 'strip-aliased': false then it fails as it should.

@bcoe bcoe transferred this issue from yargs/yargs Sep 9, 2020
@bcoe bcoe closed this as completed in #316 Sep 9, 2020
bcoe added a commit that referenced this issue Sep 9, 2020
@bcoe
Copy link
Member

bcoe commented Feb 22, 2021

@fcastilloec Just following up on this issue, with the latest version of yargs are you able to stop using your workaround, now that I've addressed this bug you shared.

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

Successfully merging a pull request may close this issue.

2 participants