From 6e78382605239dd0492125acfbdffb3bb38f60e5 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Thu, 22 Oct 2015 13:28:20 -0400 Subject: [PATCH] tools: ensure npm always uses the local node Refs: https://github.com/nodejs/node/pull/3308 PR-URL: https://github.com/nodejs/node/pull/3489 Reviewed-By: Rod Vagg --- tools/test-npm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/test-npm.sh b/tools/test-npm.sh index 23f4492e15c1ea..9cb5a80100352e 100755 --- a/tools/test-npm.sh +++ b/tools/test-npm.sh @@ -28,6 +28,9 @@ export npm_config_cache="$(pwd)/npm-cache" export npm_config_prefix="$(pwd)/npm-prefix" export npm_config_tmp="$(pwd)/npm-tmp" +# ensure npm always uses the local node +export PATH="$(../$NODE -p 'require("path").resolve("..")'):$PATH" + # install npm devDependencies and run npm's tests ../$NODE cli.js install --ignore-scripts ../$NODE test/run.js