dotnet / dotnet/command-line-api

Mandatory options if some other options are specified

Open
#1,049 5 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Hello. I went through all the examples, documentation and, in part, the source code, the list of problems, but nowhere did I find any mention of the following.

For example, I have the following:
`app.exe --p1 test --p2 test --p21 false --p22 path`

What is the right way to make certain options mandatory while other options are present? For example, --p21 and --p22 are required if --p2 is given. --p2 can be optional.

If such an opportunity is not provided in the project, then perhaps it is worth discussing this idea?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.