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:
authorisaacs <i@izs.me>2011-02-23 05:41:05 +0300
committerisaacs <i@izs.me>2011-02-23 05:41:05 +0300
commitad5a9b70051d279e2ce7f648397de11dc7230a6c (patch)
tree2ab98be4c7fda4b74b38d81fbad5316b8c32e485
parent886185e225b02e343ebe9ca53e1b99cabbdc25a6 (diff)
Add system info to error reporting
-rw-r--r--lib/utils/error-handler.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
index 615008114..9e9442835 100644
--- a/lib/utils/error-handler.js
+++ b/lib/utils/error-handler.js
@@ -31,6 +31,7 @@ function errorHandler (er) {
er.errno = npm[m] || constants[m]
}
}
+
switch (er.errno) {
case constants.ECONNREFUSED:
log.error(["If you are using Cygwin, please set up your /etc/resolv.conf"
@@ -92,6 +93,8 @@ function errorHandler (er) {
,"Just tweeting a tiny part of the error will not be helpful."
].join("\n"))
}
+ var os = require("os")
+ log.error(os.type() + " " + os.release(), "System")
exit(typeof er.errno === "number" ? er.errno : 1)
}