Skip to content

Commit 6e78382

Browse files
Fishrock123rvagg
authored andcommitted
tools: ensure npm always uses the local node
Refs: #3308 PR-URL: #3489 Reviewed-By: Rod Vagg <[email protected]>
1 parent 3c3435d commit 6e78382

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/test-npm.sh

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export npm_config_cache="$(pwd)/npm-cache"
2828
export npm_config_prefix="$(pwd)/npm-prefix"
2929
export npm_config_tmp="$(pwd)/npm-tmp"
3030

31+
# ensure npm always uses the local node
32+
export PATH="$(../$NODE -p 'require("path").resolve("..")'):$PATH"
33+
3134
# install npm devDependencies and run npm's tests
3235
../$NODE cli.js install --ignore-scripts
3336
../$NODE test/run.js

0 commit comments

Comments
 (0)