Skip to content

Commit d337cbc

Browse files
authored
Run mocha using process.execPath instead of harcoding "node" (microsoft#48797)
1 parent ad2b7a6 commit d337cbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/build/tests.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
122122

123123
try {
124124
setNodeEnvToDevelopment();
125-
const { exitCode } = await exec("node", args, { cancelToken });
125+
const { exitCode } = await exec(process.execPath, args, {
126+
cancelToken,
127+
});
126128
if (exitCode !== 0) {
127129
errorStatus = exitCode;
128130
error = new Error(`Process exited with status code ${errorStatus}.`);

0 commit comments

Comments
 (0)