Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cli.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-06-28 21:28:07 +0400
committerisaacs <i@izs.me>2010-06-28 21:28:07 +0400
commitdcc1614653afe08d228f732744bf92fc9a5f05a7 (patch)
treed0f9917e0f39e463617cab1f3050c1b30ef01deb /cli.js
parent074a9c3220f208e8050582f86c138e5801e615e4 (diff)
Exit with non-zero code on failure. Fix #71
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli.js b/cli.js
index 167a62dfc..a5ed1d4d1 100755
--- a/cli.js
+++ b/cli.js
@@ -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")
}