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 reason for the lack of error is that program.action is a function and clashes with using program.action as an option value. From Commander 4.1, you can avoid option name clashes by disabling the old behaviour using .storeOptionsAsProperties(false);
const program = require('commander');
program
. storeOptionsAsProperties(false);
program
.requiredOption('-a, --action <action>', 'service action');
program.parse(process.argv)
STR:
AR:
No "required option" error
The text was updated successfully, but these errors were encountered: