Skip to content

Commit f552793

Browse files
committed
exclude defaults bug fix
1 parent 93a0898 commit f552793

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

dist/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7984,6 +7984,9 @@ function optionalInt(argumentName, rawValue) {
79847984
}
79857985
exports.optionalInt = optionalInt;
79867986
function optionalStringArray(argumentName, rawValue) {
7987+
if (rawValue.length === 0) {
7988+
return undefined;
7989+
}
79877990
if (typeof rawValue === "string") {
79887991
throw new Error(`${argumentName}: invalid parameter - you provided "${rawValue}". This option expects an list in the EXACT format described in the readme`);
79897992
}

src/parse.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export function optionalInt(argumentName: string, rawValue: string): number | un
9191
}
9292

9393
export function optionalStringArray(argumentName: string, rawValue: string[]): string[] | undefined {
94+
if (rawValue.length === 0) {
95+
return undefined;
96+
}
97+
9498
if (typeof rawValue === "string") {
9599
throw new Error(`${argumentName}: invalid parameter - you provided "${rawValue}". This option expects an list in the EXACT format described in the readme`);
96100
}

0 commit comments

Comments
 (0)