Browse files

show help info when option error. #9

  • Loading branch information...
1 parent 156b920 commit 7332e4b035cfda2dbe6adbfc136909e512c9c5aa Hsiaoming Yang committed Mar 27, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 bin/spm
View
5 bin/spm
@@ -31,6 +31,11 @@ if (!process.env.NODE_PATH) {
console.log();
process.exit();
}
+process.on('exit', function(code) {
+ if (code === 1) {
+ commander.emit('--help');
+ }
+});
commander.helpInformation = function() {

0 comments on commit 7332e4b

Please sign in to comment.