You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just want to start off by commending the project as a whole. Very nice library, have started using it for a tool I'm building and I'm already looking at replacing previous solutions I have in other projects.
As per the title, I'd like to know if there's a way to make flags RequiredTogether but only in one direction. For example, I'm reading in config something like this:
# Edit config for specific service
./tool edit -s"customerService"# Edit config for test on service
./tool edit -s"customerService"-t"shouldReturnTrue"
And what I wanted to do was make it so that the -s flag can be used on it's own in isolation, but the -t flag cannot, as it depends on the -s flag.
But of course, this works in both directions (i.e. service name also would require test name).
Is there any way around this?
The text was updated successfully, but these errors were encountered:
notthelewis
changed the title
Mark flag as required if another flag is present
Mark flag as required if another flag is present, but not inversely so
Dec 13, 2024
Just want to start off by commending the project as a whole. Very nice library, have started using it for a tool I'm building and I'm already looking at replacing previous solutions I have in other projects.
As per the title, I'd like to know if there's a way to make flags
RequiredTogether
but only in one direction. For example, I'm reading in config something like this:And what I wanted to do was make it so that the -s flag can be used on it's own in isolation, but the -t flag cannot, as it depends on the -s flag.
My gut reaction was something like this:
But of course, this works in both directions (i.e. service name also would require test name).
Is there any way around this?
The text was updated successfully, but these errors were encountered: