Skip to content

Fix: typed options passed without a value now fail validation (fixes #38) - #65

Merged
HafizMMoaz merged 1 commit into
mainfrom
fix/issue-38-typed-option-flag
Sep 7, 2026
Merged

Fix: typed options passed without a value now fail validation (fixes #38)#65
HafizMMoaz merged 1 commit into
mainfrom
fix/issue-38-typed-option-flag

Conversation

@HafizMMoaz

Copy link
Copy Markdown
Member

A typed option given as a bare flag (for example --limit with a type of int) used to be skipped by validation and reached the command as true. Validation now reports a type error for any non string value, and a new flag type lets definitions opt into valueless options. Adds tests for the error, the flag type and that typed options with values still validate.

@HafizMMoaz
HafizMMoaz merged commit c10b2c3 into main Sep 7, 2026
2 checks passed
@HafizMMoaz
HafizMMoaz deleted the fix/issue-38-typed-option-flag branch September 7, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant