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

Negative option (--no-option) didn't work #237

Open
gilles-crealp opened this issue Apr 14, 2022 · 0 comments
Open

Negative option (--no-option) didn't work #237

gilles-crealp opened this issue Apr 14, 2022 · 0 comments
Assignees

Comments

@gilles-crealp
Copy link

Describe the bug
When you set a negative option (--no-xxx) the option xxx is always set to false.

To Reproduce

program
  .command('test')
  .option('--no-xxx')
  .action(({ options }) => console.log(options.xxx))

Run with and without --no-xxx.

Expected behavior
options.xxx must be true without --no-xxx and false with --no-xxx.

Actual behavior
options.xxx is always false.

Environment informations

  • OS: Windows
  • OS version: 10
  • Shell: cmd
  • Caporal version: 2.0.2
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

2 participants