diff options
author | isaacs <i@izs.me> | 2013-07-12 08:56:59 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-12 08:56:59 -0700 |
commit | 9da67fa5198f3c0839904ae05cbfe88c61b3ad09 (patch) | |
tree | 61c03f98b7c2ae549f67c01e1afe6dcbe84847d6 /deps/npm/lib/publish.js | |
parent | f88b8dad84cd8f37000e55f0b5de7963cbb252cf (diff) | |
download | node-new-9da67fa5198f3c0839904ae05cbfe88c61b3ad09.tar.gz |
npm: Upgrade to 1.3.3
Diffstat (limited to 'deps/npm/lib/publish.js')
-rw-r--r-- | deps/npm/lib/publish.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 62d7fb9bb0..00ffdfae36 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -98,9 +98,12 @@ function publish_ (arg, data, isRetry, cachedir, cb) { log.warn("publish", "Forced publish over "+data._id) return npm.commands.unpublish([data._id], function (er) { // ignore errors. Use the force. Reach out with your feelings. - publish([arg], true, cb) + // but if it fails again, then report the first error. + publish([arg], er || true, cb) }) } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) if (er) return cb(er) console.log("+ " + data._id) cb() |