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 #23: Respect fallthrough_ in _valid_subcommand #24

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

nathanielhourt
Copy link
Contributor

_valid_subcommand checks whether its argument appears to be a valid subcommand name or not; however, if it doesn't recognize the name, it always checks if its parent does. As described in in issue #23, this can cause incorrect behavior. To avoid this, check if fallthrough is disabled first, and do not consult the parent's known subcommands if fallthrough is disabled.

_valid_subcommand checks whether its argument appears to be a valid subcommand name or not; however, if it doesn't recognize the name, it always checks if its parent does. As described in in issue CLIUtils#23, this can cause incorrect behavior. To avoid this, check if fallthrough is disabled first, and do not consult the parent's known subcommands if fallthrough is disabled.
@henryiii
Copy link
Collaborator

I have an idea, let me try that first...

@henryiii henryiii changed the base branch from master to subcom August 23, 2017 03:51
@henryiii henryiii merged commit f595703 into CLIUtils:subcom Aug 23, 2017
@nathanielhourt nathanielhourt deleted the patch-1 branch August 23, 2017 15:35
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.

2 participants