Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
lifecycle and hook scripts should take over the terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Dec 6, 2010
1 parent 1769370 commit fe7e286
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/utils/lifecycle.js
Expand Up @@ -59,7 +59,8 @@ function runPackageLifecycle (pkg, env, wd, cb) {
var d = wd || path.join(npm.dir, pkg.name, pkg.version, "package")
d = validWd(d)

exec("sh", ["-c", env.npm_lifecycle_script], env, false, d, function (er) {
exec("sh", ["-c", env.npm_lifecycle_script], env, true, d,
function (er, code, stdout, stderr) {
if (er && !npm.ROLLBACK) {
log("Failed to exec "+stage+" script", pkg._id)
er.message = pkg._id + " "
Expand Down Expand Up @@ -88,7 +89,7 @@ function runHookLifecycle (pkg, env, wd, cb) {
d = validWd(d)
fs.stat(hook, function (er) {
if (er) return cb()
exec(hook, [], env, function (er) {
exec(hook, [], env, true, d, function (er) {
if (er) {
er.message += "\nFailed to exec "+stage+" hook script"
log(er, pkg._id)
Expand Down

0 comments on commit fe7e286

Please sign in to comment.