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

Argfiles not supported in Clikt library version 5.0 or higher #570

Open
bernardladenthin opened this issue Jan 22, 2025 · 1 comment
Open

Comments

@bernardladenthin
Copy link

bernardladenthin commented Jan 22, 2025

The implementation of argument files (argfiles) fails when using Clikt library version 5.0 or higher. The application throws an error:
got unexpected extra argument (@src/test/resources/cliargs.arg)

This issue occurs when trying to parse arguments from a file. The feature works correctly with Clikt versions below 5.0. The bug can be reproduced easily by switching to Clikt version 5.0 or higher and making a minor adjustment to the import statement.

Steps to Reproduce:

  1. Use Clikt library version 5.0 or higher.
  2. Provide an argument file (e.g., @src/test/resources/cliargs.arg).
  3. Update the import statement if necessary to match Clikt 5.0 syntax.
  4. Run the application.

Expected Behavior:
The argument file should be parsed correctly, as it works with Clikt versions below 5.0.

Actual Behavior:
The application throws an error indicating an unexpected extra argument.

Environment:

  • Clikt version: 5.0 or higher
  • Operating System: [Specify OS]
  • Java/Kotlin version: [Specify version if relevant]

Documentation: https://ajalt.github.io/clikt/advanced/#command-line-argument-files-argfiles

Attachments:

@ajalt
Copy link
Owner

ajalt commented Jan 23, 2025

I can't reproduce that problem. Argfiles work fine for me from the command line, and all the argfile unit tests pass. How are you trying to run your code?

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