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.
A primary command can take a
--versionoption with the following code:When I run
my-command my-subcommand --help, I seeBut when I run
my-command my-subcommand --version=foo,flags.versionis unpopulated.