-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
var program = require('commander');
program.version('0.1.0');
program
.command('pat <dir>')
.option('-o, --output', 'Output dir')
.action((dir, command) => {
console.log('POINT A')
});
program
.on('command:*', () => {
console.log('POINT B')
});
program.parse(process.argv)
console.log('POINT C')in POINT A, I know command pat action is run. in POINT B, I know user send a error command. in POINT C, it means may be a action is run, or none command was be sent.
but I can not find a way to know just none command was be sent, unless I add callback after signal each action, there could be hundreds..
I think program object should provide some api to get there has action be called, and which action be called?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels