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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-11-09 03:30:06 +0400
committerisaacs <i@izs.me>2012-11-09 03:30:06 +0400
commit9c63b765a6d125324cf27ae01785e0d13ec62b9f (patch)
treed8260b18680d7eedbc9ed7777d8cd27f71be45e0
parentfc4dc8fa4197c87e7ceeabc1306170fd9ff0ff1a (diff)
Expose node's execPath to scripts
Re: einaros/ws#129
-rw-r--r--lib/utils/lifecycle.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils/lifecycle.js b/lib/utils/lifecycle.js
index eae3c3e68..97adb9658 100644
--- a/lib/utils/lifecycle.js
+++ b/lib/utils/lifecycle.js
@@ -48,6 +48,7 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) {
// set the env variables, then run scripts as a child process.
var env = makeEnv(pkg)
env.npm_lifecycle_event = stage
+ env.npm_node_execpath = env.NODE = env.NODE || process.execPath
// "nobody" typically doesn't have permission to write to /tmp
// even if it's never used, sh freaks out.