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 GitHub committed 2021-12-29 23:06:21 +00:00
1 parent a698c49993
commit db02f6f132
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') {