fix(scripts): reject short flag report values

This commit is contained in:
Vincent Koc
2026-06-21 21:36:26 +02:00
parent 1b17517969
commit e21164933a
2 changed files with 6 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ import path from "node:path";
*/
function readReportOptionValue(argv, index, optionName) {
const value = argv[index + 1];
if (value === undefined || value === "" || value.startsWith("--")) {
if (value === undefined || value === "" || value.startsWith("-")) {
throw new Error(`Expected ${optionName} <value>.`);
}
return value;