Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc4c518

Browse filesBrowse files
author
Myles Borins
committed
test: ensure test-npm-install uses correct node
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>
1 parent 3c50350 commit cc4c518
Copy full SHA for cc4c518

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-npm-install.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-npm-install.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ const pkgPath = path.join(common.tmpDir, 'package.json');
3333
fs.writeFileSync(pkgPath, pkgContent);
3434

3535
const proc = spawn(process.execPath, args, {
36-
cwd: common.tmpDir
36+
cwd: common.tmpDir,
37+
env: {
38+
PATH: path.dirname(process.execPath)
39+
}
3740
});
3841

3942
function handleExit(code, signalCode) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.