Skip to content

Commit a1b5041

Browse files
committed
bug with outputHelp
1 parent be78797 commit a1b5041

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bin/pm2

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,17 @@ commander.command('kill')
192192
commander.command('*')
193193
.action(function() {
194194
console.log(PREFIX_MSG + '\nCommand not found');
195-
badArguments();
195+
commander.outputHelp();
196+
process.exit(ERROR_EXIT);
196197
});
197198

198199
//
199200
// Display help
200201
//
201202
if (process.argv.length == 2) {
202-
badArguments();
203+
commander.parse(process.argv);
204+
commander.outputHelp();
205+
process.exit(ERROR_EXIT);
203206
}
204207

205208
//
@@ -558,11 +561,6 @@ function speedList() {
558561
});
559562
}
560563

561-
function badArguments() {
562-
commander.parse(process.argv).outputHelp();
563-
process.exit(ERROR_EXIT);
564-
}
565-
566564
//
567565
// Resolving path, seing if default ...
568566
//

0 commit comments

Comments
 (0)