Skip to content

Commit e34f8e1

Browse files
vsemozhetbytjasnell
authored andcommitted
benchmark: fix CLI arguments check in common.js
PR-URL: #12429 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 42d0f8b commit e34f8e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Benchmark.prototype._parseArgs = function(argv, configs) {
4242
const extraOptions = {};
4343
// Parse configuration arguments
4444
for (const arg of argv) {
45-
const match = arg.match(/^(.+?)=([\s\S]*)$/);
46-
if (!match || !match[1]) {
45+
const match = arg.match(/^(.+?)=([\s\S]+)$/);
46+
if (!match) {
4747
console.error('bad argument: ' + arg);
4848
process.exit(1);
4949
}

0 commit comments

Comments
 (0)