diff options
author | isaacs <i@izs.me> | 2010-06-28 21:28:07 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-06-28 21:28:07 +0400 |
commit | dcc1614653afe08d228f732744bf92fc9a5f05a7 (patch) | |
tree | d0f9917e0f39e463617cab1f3050c1b30ef01deb | |
parent | 074a9c3220f208e8050582f86c138e5801e615e4 (diff) |
Exit with non-zero code on failure. Fix #71
-rwxr-xr-x | cli.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -61,6 +61,7 @@ if (!command) { if (!printVersion) { + "Check 'man npm' or 'man npm-help' for more information\n\n" + "This is supposed to happen. " ) + process.exit(1) }} else npm.commands[command](arglist, errorHandler) function errorHandler (er) { @@ -71,6 +72,7 @@ function errorHandler (er) { log("try running: 'npm help "+command+"'", "failure") log("Report this *entire* log at <http://github.com/isaacs/npm/issues>", "failure") log("or email it to <npm-@googlegroups.com>", "failure") + process.exit(1) } else log("ok") } |