Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@
);
}
} else if (arg.type === "number") {
if (parsedArgsProxy[arg.name] === undefined) {
if (arg.required) {
throw new CLIError(
`Missing required argument: --${arg.name}`,
"EARG",
);
}
continue;
}

Check warning on line 88 in src/args.ts

View check run for this annotation

Codecov / codecov/patch

src/args.ts#L81-L88

Added lines #L81 - L88 were not covered by tests

const _originalValue = parsedArgsProxy[arg.name];
parsedArgsProxy[arg.name] = Number.parseFloat(
parsedArgsProxy[arg.name] as string,
Expand Down