Skip to content

subcommands can't have a --version option #103

@jamesarosen

Description

@jamesarosen

A primary command can take a --version option with the following code:

args.option('version', 'The version of the thing');

const flags = args.parse(process.argv, {
  version: false,
});

When I run my-command my-subcommand --help, I see

 -v, --version        The version of the thing

But when I run my-command my-subcommand --version=foo, flags.version is unpopulated.

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