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>2010-05-17 02:03:09 +0400
committerisaacs <i@izs.me>2010-05-17 02:03:09 +0400
commit430e3e9cac42237131eadeb8dcf47ad579f98dee (patch)
treecee6cdb60ee2f7f23dc1b5baf3b3e25d23aae881 /scripts
parentc53381a65200256b52613c900f73635ecd97b1aa (diff)
don't panic when docs don't install.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-docs.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/install-docs.js b/scripts/install-docs.js
index 1466e4bf7..cbbd7b1db 100644
--- a/scripts/install-docs.js
+++ b/scripts/install-docs.js
@@ -15,6 +15,11 @@ var event = process.env.npm_lifecycle_event
log(event, "docs")
+function dontPanic (er) {
+ log(er, "doc install failed")
+ log("probably still ok otherwise, though", "don't panic")
+}
+
exec("manpath", [], function (er, code, stdout, stderr) {
var manpath = er ? [] : stdout.trim().split(":")
if (manpath.indexOf(path.dirname(manTarget)) === -1) {
@@ -23,8 +28,8 @@ exec("manpath", [], function (er, code, stdout, stderr) {
log("See: man man", "!")
}
mkdir(manTarget, function (er) {
- if (er) throw er
- installDocs()
+ if (er) dontPanic(er)
+ else installDocs()
})
})
function installDocs () {
@@ -45,8 +50,8 @@ function installDocs () {
( path.join(process.cwd(), "man", doc)
, target
, function (er, ok) {
- if (er) throw er
- R(docs.pop())
+ if (er) dontPanic(er)
+ else R(docs.pop())
}
)
}