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

Validate option does not work in combination with the args option #10

Open
LukasHoerger opened this issue Sep 25, 2024 · 0 comments
Open

Comments

@LukasHoerger
Copy link

Thank you for this package!

I found a small bug in combination of the two options -args and -validate.
Consider the following example:

proc myOk {args} {
  return 1
}

proc validateIssue {args} {
  parse_args::parse_args $args {
    -filterValid {-args 2}
    -filterInvalid {-args 2 -validate myOk}
  }
  puts "$filterValid $filterInvalid"
}

validateIssue -filterValid 1 a -filterInvalid 2 b

the expected output would be 1 a 2 b but instead it is only 1 a .
If i change the args count to 1 everything works as expected.

I'm using version 0.5.1.
If there is any additional information I can provide, please let me know.

Thank you in advance
Lukas

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

1 participant