-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Commander version 2.13.0
Calling commander.js with an unknown option or an unknown command leads to the program exiting silently with an exit status of 0.
Ex.
./commanderjsbinary --option1 "argument1" --boolean-option-1 this-command-doesnt-exist cmd "cmdargs"
Note: The following example is minimal, but in bigger projects with existing options it causes the program to exit without warning if for example the user mistypes an argument. This behaviour is certainly unexpected.
A working minimal example:
const program = require('commander');
program.command('existingOption <argument>').description('bla').action(() => {
});
program.parse(process.argv);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels