We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With an @option defined like this:
@Command( name = "main" subcommands = { SubCmd.class, CommandLine.HelpCommand.class } ) public class Main { @Option( names = "-D", paramLabel = "<key=value>", mapFallbackValue = Option.NULL_VALUE, scope = ScopeType.INHERIT ) private final Map<String, String> javaOpts = new HashMap<>(); } @Command(name = "sub") public class SubCmd { @ParentCommand private Main parent; }
Running with args like ["sub", "-Dxyz"] results in error message:
Value for option option '-D' (<key=value>) should be in KEY=VALUE format but was xyz
This seems like it might be because the ArgSpec Builder copy constructor doesn't copy the "mapFallbackValue" field in picocli 4.7.3: https://github.com/remkop/picocli/blob/v4.7.3/src/main/java/picocli/CommandLine.java#L9496
The text was updated successfully, but these errors were encountered:
Thank you for raising this, and thank you for the analysis! It’s very plausible that that’s the cause.
Will you be able to provide a pull request for this?
Sorry, something went wrong.
Fixes remkop#2035 - include mapFallbackValue for inherited opts
3d5cf22
PR #2036 opened
Fixes #2035 - include mapFallbackValue for inherited opts
5984589
[#2026][#2027][#2029][#2034][#2035][#2036][#1848][#2030] update RELEA…
0bebcc5
…SE-NOTES
Successfully merging a pull request may close this issue.
With an @option defined like this:
Running with args like ["sub", "-Dxyz"] results in error message:
This seems like it might be because the ArgSpec Builder copy constructor doesn't copy the "mapFallbackValue" field in picocli 4.7.3: https://github.com/remkop/picocli/blob/v4.7.3/src/main/java/picocli/CommandLine.java#L9496
The text was updated successfully, but these errors were encountered: