Skip to content

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

Description

@LukasHoerger

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions