Merge pull request #18 from rlidwka/outputhelp2

bug with outputHelp
This commit is contained in:
Alexandre Strzelewicz 2013-06-20 20:19:35 -07:00
commit 0a3c257d87

12
bin/pm2
View File

@ -192,14 +192,17 @@ commander.command('kill')
commander.command('*')
.action(function() {
console.log(PREFIX_MSG + '\nCommand not found');
badArguments();
commander.outputHelp();
process.exit(ERROR_EXIT);
});
//
// Display help
//
if (process.argv.length == 2) {
badArguments();
commander.parse(process.argv);
commander.outputHelp();
process.exit(ERROR_EXIT);
}
//
@ -558,11 +561,6 @@ function speedList() {
});
}
function badArguments() {
commander.parse(process.argv).outputHelp();
process.exit(ERROR_EXIT);
}
//
// Resolving path, seing if default ...
//