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
diff options
context:
space:
mode:
-rwxr-xr-xcli.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/cli.js b/cli.js
index f77200151..839063274 100755
--- a/cli.js
+++ b/cli.js
@@ -44,10 +44,12 @@ for (var k in conf) npm.config.set(k, conf[k])
if (!command) npm.commands.help([arglist.join(" ")])
else npm.commands[command](arglist, function (er, ok) {
if (er) {
- npm.commands.help([command], function () {
- log(er.stack, "failed")
- process.stdout.flush()
- throw er
- })
+ sys.error("")
+ log("Error: "+er.message, "!")
+ var s = er.stack.split("\n").slice(2)
+ s.forEach(function (s) { log(s, "!") })
+ sys.error("")
+ log("try running: 'npm help "+command+"'", "failure")
+ log("or report this to <npm-@googlegroups.com>", "failure")
} else log("ok")
})