Skip to content

Commit

Permalink
fix: backport a fix from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eagle committed May 29, 2020
1 parent c27d2a7 commit 24cb37e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion internal/node/node_patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,10 @@ fi
process.env.PATH = nodeDir + path.delimiter + process.env.PATH;
}
// fix execPath so folks use the proxy node
process.argv[0] = process.execPath = path.join(nodeDir, 'node');
if (process.platform == 'win32') ;
else {
process.argv[0] = process.execPath = path.join(nodeDir, 'node');
}
// replace any instances of require script in execArgv with the absolute path to the script.
// example: bazel-require-script.js
process.execArgv.map(v => {
Expand Down
6 changes: 5 additions & 1 deletion packages/node-patches/src/subprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ fi
}

// fix execPath so folks use the proxy node
process.argv[0] = process.execPath = path.join(nodeDir, 'node');
if (process.platform == 'win32') {
// FIXME: need to make an exe, or run in a shell so we can use .bat
} else {
process.argv[0] = process.execPath = path.join(nodeDir, 'node');
}

// replace any instances of require script in execArgv with the absolute path to the script.
// example: bazel-require-script.js
Expand Down

0 comments on commit 24cb37e

Please sign in to comment.