-
Notifications
You must be signed in to change notification settings - Fork 425
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
App with subcommand: reading arguments from @file fails with quoted option value #1457
Comments
Nice catch! Tracing shows this:
So the picocli parser receives three arguments: Internally picocli uses a I don't like the prospect of creating a custom tokenizer, so perhaps the best way to deal with this is to document that any quoted value is interpreted as a separate argument, so instead of
or
Thoughts? |
Thanks for pointing out what's internally going on here.
I fully agree, I don't like that apporach either.
I just submitted PR #1462 which extends the documentation of argument files.
Fortunately, you can work around this by using a VM argument or by setting envoriment variable |
Wonderful, thank you for the PR! |
Minimal working example:
AtTest.java:
I can run the
sub
subcommand without problems:$ java -cp "my.jar" AtTest sub -p="PREFIX"
Prefix: PREFIX
Now I want to run the subcommand via an
@file
. Thus I'm creating the needed@file
whichs helds the previously used command line arguments:Test.at:
sub -p="PREFIX"
When trying to execute the
sub
subcommand, I'm running into trouble:Once I remove the quotes from the option value (
sub -p=PREFIX
), the program runs fine using the@file
.Is this the intended behaviour? Can I make use of quoted values inside an
@file
when using subcommands?The text was updated successfully, but these errors were encountered: