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 Dec 29, 2021
1 parent a698c49 commit db02f6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions benchmark/run.js
Original file line number Diff line number Diff line change
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 db02f6f

Please sign in to comment.