diff options
author | isaacs <i@izs.me> | 2010-08-27 21:31:39 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-08-27 21:31:39 +0400 |
commit | 792280a9f9de249a71925a26026e5d0459514d49 (patch) | |
tree | 66fb75035e44532e00e3f6a8d08a9887114f4c14 /cli.js | |
parent | 1c992a9ab092bb8f5baec51f4e861b2ec3ed6c14 (diff) |
Better error message for cygwin DNS issuev0.1.27-7
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -91,9 +91,20 @@ function errorHandler (er) { return rm(npm.tmp, function (er) { process.exit(0) }) } log.error(er) - log.error("try running: 'npm help "+command+"'") - log.error("Report this *entire* log at <http://github.com/isaacs/npm/issues>") - log.error("or email it to <npm-@googlegroups.com>") + if (er.message.trim() === "ECONNREFUSED, Could not contact DNS servers") { + log.error(["If you are using Cygwin, please set up your /etc/resolv.conf" + ,"See step 3 in this wiki page:" + ," http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29" + ,"If you are not using Cygwin, please report this" + ,"at <http://github.com/isaacs/npm/issues>" + ,"or email it to <npm-@googlegroups.com>" + ].join("\n")) + } else { + log.error(["try running: 'npm help "+command+"'" + ,"Report this *entire* log at <http://github.com/isaacs/npm/issues>" + ,"or email it to <npm-@googlegroups.com>" + ].join("\n")) + } rm(npm.tmp, function (er) { process.exit(1) }) } |