benchmark: fix benchmark/run.js handling of --set

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: https://github.com/nodejs/node/pull/41334
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rich Trott authored and Michaël Zasso committed 2022-01-14 16:19:42 +01:00
1 parent 1150963217
commit 88d760c559
1 file changed
+1 -2
+1 -2
View File
@@ -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') {