Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Always favor the bundled node-gyp

  • Loading branch information...
commit 2605310ed23ada71c93997c7d076718a628205f5 1 parent 541693c
@isaacs isaacs authored
View
2  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" "$@"
View
1  bin/node-gyp-bin/node-gyp.cmd
@@ -0,0 +1 @@
+node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
View
5 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" ? ";" : ":")
Please sign in to comment.
Something went wrong with that request. Please try again.