diff options
author | isaacs <i@izs.me> | 2010-05-17 02:03:09 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-17 02:03:09 +0400 |
commit | 430e3e9cac42237131eadeb8dcf47ad579f98dee (patch) | |
tree | cee6cdb60ee2f7f23dc1b5baf3b3e25d23aae881 | |
parent | c53381a65200256b52613c900f73635ecd97b1aa (diff) |
don't panic when docs don't install.
-rw-r--r-- | scripts/install-docs.js | 13 |
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()) } ) } |