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
And what I want is: When Test SubCommand is set, one of cat and dog should be set(or it means that they are in a Group, and the group is required when Test is set); And when Debug is set, host should be set.
I have read the doc and examples, but I am not sure how to implement this function? 😭
The text was updated successfully, but these errors were encountered:
From what I've seen so far, clap allows validation of relationship of args and groups but subcommands are effectively in another namespace, preventing them from interacting with that system.
In clap3, there is App::error to create clap-like errors for custom validation. There is also interest in generalizing clap's mechanisms so people are less likely to run into hurdles like this.
Hi, I am new to structopt. And I am not sure is it a structopt issue or a clap issue? Here is the situation I met:
I defined it, like:
And what I want is: When
Test
SubCommand is set, one ofcat
anddog
should be set(or it means that they are in aGroup
, and the group is required whenTest
is set); And whenDebug
is set,host
should be set.I have read the doc and examples, but I am not sure how to implement this function? 😭
The text was updated successfully, but these errors were encountered: