-
Notifications
You must be signed in to change notification settings - Fork 420
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
Can required options be inherited? #1001
Labels
theme: parser
An issue or change related to the parser
Milestone
Comments
remkop
added a commit
that referenced
this issue
Apr 23, 2020
remkop
added a commit
that referenced
this issue
Apr 30, 2020
remkop
added a commit
that referenced
this issue
May 3, 2020
remkop
added a commit
that referenced
this issue
May 3, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
jerrylususu
pushed a commit
to jerrylususu/picocli
that referenced
this issue
May 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ticket #649 provided support for inherited options.
This is a follow-up ticket for the following scenario.
Problem
Suppose we define a command with a
required = true
option that is also marked asscope = INHERIT
, and a subcommand, like this:Now, if the end user invokes the command with the following parameters:
Currently, validation on the required options of the top-level command is done when the parser detects that a subcommand was invoked. Since at that point the required option has not been matched yet, the parser gives this error:
Missing required option '-x=<x>'
.Solutions
required
options from beingINHERIT
-ed. Picocli could throw anInitializationException
at startup when it creates the model.The text was updated successfully, but these errors were encountered: