Skip to content

Commit

Permalink
benchmark: fix benchmark/run.js handling of --set
Browse files Browse the repository at this point in the history
run.js does not work with --set as it tries to include it as
options to `fork()` rather than as part of argv for `fork()`. This
doesn't throw an error because of a quirk in `fork()` that silently
accepts arrays for options objects. This will be changing in Node.js
18.x.

PR-URL: #41334
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and targos committed Jan 14, 2022
1 parent 1150963 commit 88d760c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions benchmark/run.js
Expand Up @@ -42,8 +42,7 @@ if (format === 'csv') {
const filename = benchmarks[i];
const child = fork(
path.resolve(__dirname, filename),
cli.test ? ['--test'] : [],
cli.optional.set
cli.test ? ['--test'] : cli.optional.set
);

if (format !== 'csv') {
Expand Down

0 comments on commit 88d760c

Please sign in to comment.