Skip to content

Commit

Permalink
test: ensure test-npm-install uses correct node
Browse files Browse the repository at this point in the history
Currently it is possible that the shelled out instance of npm will use
the system copy of node. This PR changes the test to shim the build
directory into the path. This will ensure that npm will use the correct
version of node.

fixes: #6648

PR-URL: #6658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
Myles Borins committed May 18, 2016
1 parent 3c50350 commit cc4c518
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-npm-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const pkgPath = path.join(common.tmpDir, 'package.json');
fs.writeFileSync(pkgPath, pkgContent);

const proc = spawn(process.execPath, args, {
cwd: common.tmpDir
cwd: common.tmpDir,
env: {
PATH: path.dirname(process.execPath)
}
});

function handleExit(code, signalCode) {
Expand Down

0 comments on commit cc4c518

Please sign in to comment.