Skip to content

Commit

Permalink
Better error message for cygwin DNS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 27, 2010
1 parent 1c992a9 commit 792280a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>")
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 <[email protected]>"
].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 <[email protected]>"
].join("\n"))
}
rm(npm.tmp, function (er) { process.exit(1) })
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ "name" : "npm"
, "description" : "A package manager for node"
, "version" : "0.1.27-6"
, "version" : "0.1.27-7"
, "homepage" : "http://npmjs.org/"
, "author" : "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me)"
, "contributors" :
Expand Down

0 comments on commit 792280a

Please sign in to comment.