We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56859c5 commit bbb5c29Copy full SHA for bbb5c29
lib/utils/lifecycle.js
@@ -18,7 +18,6 @@ function lifecycle (pkg, stage, cb) {
18
// set the env variables, then run scripts as a child process.
19
var env = makeEnv(pkg)
20
env.npm_lifecycle_event = stage
21
- log.silly(env, "lifecycle env")
22
23
var packageLifecycle = pkg.scripts && (stage in pkg.scripts)
24
@@ -27,6 +26,7 @@ function lifecycle (pkg, stage, cb) {
27
26
env.npm_lifecycle_script = pkg.scripts[stage]
28
}
29
+ log.silly(env, "lifecycle env")
30
chain
31
( packageLifecycle && [runPackageLifecycle, pkg, env]
32
, [runHookLifecycle, pkg, env]
@@ -68,7 +68,10 @@ function runHookLifecycle (pkg, env, cb) {
68
fs.stat(hook, function (er) {
69
if (er) return cb()
70
exec(hook, [], env, function (er) {
71
- if (er) log("Failed to exec "+stage+" hook script", pkg._id)
+ if (er) {
72
+ er.message += "\nFailed to exec "+stage+" hook script"
73
+ log(er, pkg._id)
74
+ }
75
if (npm.ROLLBACK) return cb()
76
cb(er)
77
})
0 commit comments