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
path: root/lib
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2015-10-06 00:17:56 +0300
committerRebecca Turner <me@re-becca.org>2015-10-09 01:54:45 +0300
commit5ae842d6b1b64dbdcb05a0257cf04a85fc290665 (patch)
treeb45bac40c0b8120ff695ef6247854c2138b5c3b3 /lib
parent5060491913b8bcc0ecb15769fb6604b084d4cc15 (diff)
lifecycle: Remove dead code around npm.ROLLBACK global
PR-URL: https://github.com/npm/npm/pull/9892
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/lifecycle.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/utils/lifecycle.js b/lib/utils/lifecycle.js
index 1c0d437a9..766145f18 100644
--- a/lib/utils/lifecycle.js
+++ b/lib/utils/lifecycle.js
@@ -237,7 +237,7 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
function procError (er) {
if (progressEnabled) log.enableProgress()
- if (er && !npm.ROLLBACK) {
+ if (er) {
log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script')
er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' +
er.message
@@ -248,13 +248,8 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) {
er.stage = stage
er.script = cmd
er.pkgname = pkg.name
- return cb(er)
- } else if (er) {
- log.error('lifecycle', logid(pkg, stage), er)
- log.error('lifecycle', logid(pkg, stage), 'continuing anyway')
- return cb()
}
- cb(er)
+ return cb(er)
}
}