File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,25 @@ const cp = require('child_process');
1010
1111// try to build up the complete path to node-gyp
1212/* priority:
13+ - node-gyp on ENV:NODEJS_MOBILE_GYP
1314 - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887)
1415 - node-gyp on NODE_PATH
1516 - node-gyp inside npm on NODE_PATH (ignore on iojs)
1617 - node-gyp inside npm beside node exe
1718*/
1819function which_node_gyp ( ) {
1920 let node_gyp_bin ;
21+ if ( process . env . NODEJS_MOBILE_GYP ) {
22+ // nodejs-mobile was using npm_config_node_gyp, but that's currently being overwritten by npm 7+
23+ try {
24+ node_gyp_bin = process . env . NODEJS_MOBILE_GYP ;
25+ if ( existsSync ( node_gyp_bin ) ) {
26+ return node_gyp_bin ;
27+ }
28+ } catch ( err ) {
29+ // do nothing
30+ }
31+ }
2032 if ( process . env . npm_config_node_gyp ) {
2133 try {
2234 node_gyp_bin = process . env . npm_config_node_gyp ;
You can’t perform that action at this time.
0 commit comments