Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to make an option required based on some other option value #1867

Closed
shivimakwana opened this issue Apr 20, 2023 · 2 comments
Closed

Comments

@shivimakwana
Copy link

Can we do something like this currently using commander ?

there is option x
if x == "some value":
program.requiredOption("-y, --y<>", "description");

@shadowspawn
Copy link
Collaborator

No, there is not built-in support for this. The available routines are .requiredOption() and .conflicts() and .implies().

Related: #1802

@shadowspawn
Copy link
Collaborator

An answer was provided, and no further activity in a month. Closing this as resolved.

Feel free to open a new issue if it comes up again, with new information and renewed interest.

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

No branches or pull requests

2 participants