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

Fix bug in which "fooasdf -o=foo" is incorrectly identified as the subcommand "foo" #93

Merged
merged 2 commits into from Apr 21, 2022

Commits on Apr 21, 2022

  1. add failing test for subcommand argument parsing

    Add a failing test demonstrating that "fooasdf -o=foo" is incorrectly
    matched to the subcommand "foo".
    kmoe committed Apr 21, 2022
    Copy the full SHA
    3bf635d View commit details
    Browse the repository at this point in the history
  2. exclude flags from subcommand parsing

    When determining the string to use when querying the radix tree for the
    longest subcommand, exclude any argument beginning with a "-", since
    this is a flag and not a subcommand.
    
    This fixes a bug in which "fooasdf -o=foo" is matched to the subcommand
    "foo" due to logic further down on line 704.
    kmoe committed Apr 21, 2022
    Copy the full SHA
    4bb9ba2 View commit details
    Browse the repository at this point in the history