-
I'm trying to have options only available if one of the positionnal is a certain value.
Is there an easy way to do that with Clap other than checking afterwards? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
So I'm assuming We have some behavior that allows checks like that (e.g. |
Beta Was this translation helpful? Give feedback.
-
Alright, I'll keep an eye out for this. |
Beta Was this translation helpful? Give feedback.
So I'm assuming
java
/gradle
is mean to be a positional argument. It sounds like you are wanting to declare a conflict between some argument values and flags.We have some behavior that allows checks like that (e.g.
requires_if
) but we don't have one for conflicts. I'm hesitant to expand the API to cover all of the forms of validation people request and am instead looking for ways to make this more flexible. This is being explored in #3476.