We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
required: false
1 parent 188d60c commit ab0401bCopy full SHA for ab0401b
src/args.ts
@@ -48,7 +48,7 @@ export function parseArgs<T extends ArgsDef = ArgsDef>(
48
const nextPositionalArgument = positionalArguments.shift();
49
if (nextPositionalArgument !== undefined) {
50
parsedArgsProxy[arg.name] = nextPositionalArgument;
51
- } else if (arg.default === undefined) {
+ } else if (arg.default === undefined && arg.required !== false) {
52
throw new CLIError(
53
`Missing required positional argument: ${arg.name.toUpperCase()}`,
54
"EARG",
0 commit comments