Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

node exe dir to the PATH for lifestyle scripts

Fixes #2680.
  • Loading branch information...
commit 898594413b0ca3d4bf120dfffeb493dae516b4e9 1 parent 4c41a75
@TooTallNate TooTallNate authored isaacs committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/utils/lifecycle.js
View
4 lib/utils/lifecycle.js
@@ -78,6 +78,10 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) {
// the bundled one will be used for installing things.
pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin"))
+ // add the directory containing the `node` executable currently running, so
+ // that any lifecycle script that invoke "node" will execute this same one.
+ pathArr.unshift(path.dirname(process.execPath))
+
if (env[PATH]) pathArr.push(env[PATH])
env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":")
Please sign in to comment.
Something went wrong with that request. Please try again.