-
Notifications
You must be signed in to change notification settings - Fork 67
.required() on Parsers doesn't make them fail the parse #39
Comments
Oh, hey, looks like #28 is already addressing this, so I'll just leave the issue here for now. If either of you need a hand with this just let me know. |
Also just bumped into this, and #28 seems to have been hanging there for a while now. |
Was it fixed? Update: checked master and it still reproduces |
So #28 got replaced, apparently, with another patch that didn't actually do this? |
+1 this is super confusing...I made an |
If it's any consolation |
Can that commit just be ported over to this repo and submitted as a PR? (There's #94 but it seems less nice than this one.) |
Hmm. Doesn't solve the "this is used in catch2" problem though. |
I don't see where |
Because I'm working on a test suite with a custom main function in catch2, and I'm trying to do what is recommended there and use Clara to parse my custom arguments. I do have required arguments. |
I'm guessing this is just not written yet, since the spot where it'd go at the end of
parse()
has a// !TBD
about it. It doesn't look like there's a super clean place to expose required/not to users of the API, since there's no magicoperator()
/operator[]
left open for it, in contrast with descriptions/flags (unless you want to get cute with overloading), but even just correct behavior with the somewhat-less-pretty .required() would work for me.If you've got an approach in mind, I'd be happy to take a whack at it since it looks like it won't take too much to do.
cc @TheOnlyRew
The text was updated successfully, but these errors were encountered: