diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index 0c2e4df52f..b6ef67bf32 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -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) {