Skip to content

Commit 9dd7e8c

Browse files
test: use execFileSync to execute processes in benchmark (#2141)
1 parent 6559b3d commit 9dd7e8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bench/prof.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ if (process.execArgv.indexOf("--prof") < 0) {
2121
fs.unlink(file);
2222
});
2323
process.stdout.write("generating profile (may take a while) ...\n");
24-
child_process.execSync("node --prof --trace-deopt " + process.execArgv.join(" ") + " " + process.argv.slice(1).join(" "), {
24+
child_process.execFileSync("node", ["--prof", "--trace-deopt", ...process.execArgv, ...process.argv.slice(1)], {
2525
cwd: process.cwd(),
2626
stdio: "inherit"
2727
});
2828
process.stdout.write("processing profile ...\n");
2929
fs.readdirSync(process.cwd()).forEach(function readdirSync_it(file) {
3030
if (logRe.test(file)) {
31-
child_process.execSync("node --prof-process " + file, {
31+
child_process.execFileSync("node", ["--prof-process", file], {
3232
cwd: process.cwd(),
3333
stdio: "inherit"
3434
});

0 commit comments

Comments
 (0)