Skip to content

Commit d374c1e

Browse files
james-elicxvicb
andauthored
Update packages/cloudflare/src/cli/args.ts
Co-authored-by: Victor Berchet <[email protected]>
1 parent 7d17b7c commit d374c1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cloudflare/src/cli/args.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ export function getPassthroughArgs<T extends ParseArgsConfig>(args: string[], {
9898
if (name && !(name in options)) {
9999
passthroughArgs.push(args[i]!);
100100

101-
while (!args[i + 1]?.startsWith("-")) {
101+
// Array args can have multiple values
102+
// ref https://github.com/yargs/yargs-parser/blob/main/README.md#greedy-arrays
103+
while (i < args.length - 1 && !args[i + 1]?.startsWith("-")) {
102104
passthroughArgs.push(args[++i]!);
103105
}
104106
}

0 commit comments

Comments
 (0)