diff options
-rwxr-xr-x | bin/node-gyp-bin/node-gyp | 2 | ||||
-rwxr-xr-x | bin/node-gyp-bin/node-gyp.cmd | 1 | ||||
-rw-r--r-- | lib/utils/lifecycle.js | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/bin/node-gyp-bin/node-gyp b/bin/node-gyp-bin/node-gyp new file mode 100755 index 000000000..345f07a18 --- /dev/null +++ b/bin/node-gyp-bin/node-gyp @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" diff --git a/bin/node-gyp-bin/node-gyp.cmd b/bin/node-gyp-bin/node-gyp.cmd new file mode 100755 index 000000000..c2563ea11 --- /dev/null +++ b/bin/node-gyp-bin/node-gyp.cmd @@ -0,0 +1 @@ +node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
diff --git a/lib/utils/lifecycle.js b/lib/utils/lifecycle.js index 085dcc88a..92b086e69 100644 --- a/lib/utils/lifecycle.js +++ b/lib/utils/lifecycle.js @@ -73,6 +73,11 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { acc = path.join(acc, "node_modules", pp) }) pathArr.unshift(path.join(acc, "node_modules", ".bin")) + + // we also unshift the bundled node-gyp-bin folder so that + // the bundled one will be used for installing things. + pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin")) + if (env[PATH]) pathArr.push(env[PATH]) env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":") |