Skip to content

Conversation

@natecook1000
Copy link
Member

We were incorrectly skipping over dash-prefixed inputs when looking for the next
subcommand. This means that input like command sub1 --foo sub2 would match the
sub1 and sub2 subcommands, even if --foo wasn't defined by sub1. This manifested
in issues where a value expected by --foo would be eaten by the subcommand matcher.

Note that this changes a couple test fixtures where we were incorrectly specifying inputs.

Fixes #92.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

…mand

We were incorrectly skipping over dash-prefixed inputs when looking for the next
subcommand. This means that input like `command sub1 --foo sub2` would match the
sub1 and sub2 subcommands, even if `--foo` wasn't defined by sub1. This manifested
in issues where a value expected by `--foo` would be eaten by the subcommand matcher.

Fixes #92.
@natecook1000 natecook1000 force-pushed the nate/default_subcommand_fix branch from fa5f34c to b66f637 Compare March 21, 2020 18:34
@natecook1000 natecook1000 merged commit 72fb0b1 into master Mar 22, 2020
@natecook1000 natecook1000 deleted the nate/default_subcommand_fix branch March 22, 2020 18:27
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

Successfully merging this pull request may close these issues.

Default subcommand fails if an option's value is the same as a subcommand name

2 participants