Skip to content

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

Open
@gilles-crealp

Description

@gilles-crealp

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions