You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the parser seems to negate an integer parameter whenever
a program command is added, and
and option to it is called without a space
program.command('update [directory...]').option('-j, --jobs <max>','Limit concurrent downloads. Default 2',2).action(async(directory,opts)=>{console.log(`number of jobs to run: ${opts.jobs}`);});program.parse(process.argv);
Output:
$ ./commandertest.js update -j 4
number of jobs to run: 4
$ ./commandertest.js update -j4
number of jobs to run: -4 ***** EXPECTED: 4 *****
If the command line is removed, this reversing of sign does not happen.
The text was updated successfully, but these errors were encountered:
Ah, I am guessing you are using a commander version below v5. Earlier versions did not have support for combining the option and option value into a single argument for a subcommand. Instead the short options were unconditionally expanded to separate short flags.
the parser seems to negate an integer parameter whenever
Output:
If the
command
line is removed, this reversing of sign does not happen.The text was updated successfully, but these errors were encountered: