mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-03 14:03:52 +00:00
Merge pull request #24 from nathanhourt/patch-1
Fix #23: Respect fallthrough_ in _valid_subcommand
This commit is contained in:
commit
f59570328a
@ -857,7 +857,7 @@ class App {
|
|||||||
for(const App_p &com : subcommands_)
|
for(const App_p &com : subcommands_)
|
||||||
if(com->check_name(current))
|
if(com->check_name(current))
|
||||||
return true;
|
return true;
|
||||||
if(parent_ != nullptr)
|
if(parent_ != nullptr && fallthrough_)
|
||||||
return parent_->_valid_subcommand(current);
|
return parent_->_valid_subcommand(current);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user