Skip to content

Commit d9585b3

Browse files
committed
try sudo
1 parent 51ddd25 commit d9585b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

resources/benchmark.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,9 @@ function sampleModule(modulePath: string): BenchmarkSample {
412412
`;
413413

414414
const result = cp.spawnSync(
415-
process.execPath,
415+
'sudo',
416416
[
417+
`"${process.execPath}"`,
417418
// V8 flags
418419
'--predictable',
419420
'--no-concurrent-sweeping',
@@ -425,9 +426,10 @@ function sampleModule(modulePath: string): BenchmarkSample {
425426
// Node.js flags
426427
'--input-type=module',
427428
'--eval',
428-
sampleCode,
429+
`"${sampleCode}"`,
429430
],
430431
{
432+
shell: true,
431433
stdio: ['inherit', 'inherit', 'inherit', 'pipe'],
432434
env: { NODE_ENV: 'production' },
433435
},

0 commit comments

Comments
 (0)