Skip to content

On and off switches are not working #108

@dignifiedquire

Description

@dignifiedquire

If I try

program.command('start')
  .option('--auto-watch', 'Description')
  .option('--no-auto-watch', 'Description')
  .action(function(options) {
    console.log(options.autoWatch);
  });

I get the following output:

$ node program.js start --auto-watch
false
$ node program.js start --no-auto-watch
false
$ node program.js start
true

That should not happen. I need the first one to be true. Also if I try to set a default value of true that won't work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions