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

Vec<String> aren't parsing in clap 3.0 #126

Closed
rajarshimaitra opened this issue Oct 13, 2022 · 1 comment · Fixed by #124
Closed

Vec<String> aren't parsing in clap 3.0 #126

rajarshimaitra opened this issue Oct 13, 2022 · 1 comment · Fixed by #124
Labels
bug Something isn't working enhancement New feature or request

Comments

@rajarshimaitra
Copy link
Contributor

After migrating to clap 3.0 from structopt I am observing the vector of strings are not being parsed properly.. Even if we declare the arg as Vec<String> its only reading the first value, creating a vector of 1 item and when encountering the second value throwing an error..

Possible course of actions.

  • Figure out whats the correct way to parse vector of strings in clap 3.0.
  • If that's not possible for some reason figure out a work around.

Observations

  • Vec parsing happens correctly for the top level command, which derives Parser.
  • Vec parsing fails at internal subcommand options, like create_tx, compact_filters_options etc. These options cannot derive Parser as Subcommand is already derived for them, and causes conflicting implementation.
@rajarshimaitra rajarshimaitra added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Oct 13, 2022
@rajarshimaitra rajarshimaitra linked a pull request Oct 30, 2022 that will close this issue
3 tasks
@rajarshimaitra rajarshimaitra removed the help wanted Extra attention is needed label Oct 31, 2022
@rajarshimaitra
Copy link
Contributor Author

Closing this in favor of #124 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant