mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
add checks and fixes for extrasError argument order (#1162)
Adds tests and checks for Extras Error Builds on #1158 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1800,7 +1800,10 @@ CLI11_INLINE bool App::_parse_positional(std::vector<std::string> &args, bool ha
|
||||
}
|
||||
}
|
||||
if(positionals_at_end_) {
|
||||
throw CLI::ExtrasError(name_, args);
|
||||
std::vector<std::string> rargs;
|
||||
rargs.resize(args.size());
|
||||
std::reverse_copy(args.begin(), args.end(), rargs.begin());
|
||||
throw CLI::ExtrasError(name_, rargs);
|
||||
}
|
||||
/// If this is an option group don't deal with it
|
||||
if(parent_ != nullptr && name_.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user