We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a regression in the version v1.17
See this sample:
var program = require("commander"); program .version("0.0.1") .command("*") .description("test") .action(function(cmd) { cmdValue = cmd; }); program.parse(process.argv); if (typeof cmdValue === "undefined") { console.error("no command given!"); } else { console.log("command:", cmdValue); }
$ node test.js no command given!
$ node test.js command: Command { commands: [], options: [], _execs: {}, _allowUnknownOption: false, _args: [], _name: '*', _noHelp: false, parent: Command { commands: [ [Circular] ], options: [ [Object] ], _execs: {}, _allowUnknownOption: false, _args: [], _name: 'test', Command: { [Function: Command] super_: [Object] }, Option: [Function: Option], _version: '0.0.1', _versionOptionName: 'version', _events: { 'option:version': [Function], 'command:*': [Function: listener] }, _eventsCount: 2, rawArgs: [ 'C:\\Program Files\\nodejs\\node.exe', 'C:\\Users\\schroeterm\\Desktop\\test\\test.js' ], args: [] }, _description: 'test', _argsDescription: undefined }
The text was updated successfully, but these errors were encountered:
Thanks for the report! It is a bug when I fixed this issue (#778). I will fix it.
Sorry, something went wrong.
Upgrade dependencies
e5c8d41
Use commander@1.16 because of bug in 1.17. See tj/commander.js#843
Fix a bug in command emit
ca86673
fixes: tj#843 fixes: tj#842
ad34717
fixes: #843 fixes: #842
abetomo
Successfully merging a pull request may close this issue.
There is a regression in the version v1.17
See this sample:
v1.16
v1.17
The text was updated successfully, but these errors were encountered: