From 9e85fc6fe8acb179e2c0e4274310f44e4c3d33aa Mon Sep 17 00:00:00 2001 From: Alexander Galanin Date: Mon, 5 May 2025 19:18:27 +0300 Subject: [PATCH] Fix the order of argument in command-line parsing error message --- include/CLI/Error.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/CLI/Error.hpp b/include/CLI/Error.hpp index 56779c1d8..5b2771bbb 100644 --- a/include/CLI/Error.hpp +++ b/include/CLI/Error.hpp @@ -310,13 +310,13 @@ class ExtrasError : public ParseError { explicit ExtrasError(std::vector args) : ExtrasError((args.size() > 1 ? "The following arguments were not expected: " : "The following argument was not expected: ") + - detail::rjoin(args, " "), + detail::join(args, " "), ExitCodes::ExtrasError) {} ExtrasError(const std::string &name, std::vector args) : ExtrasError(name, (args.size() > 1 ? "The following arguments were not expected: " : "The following argument was not expected: ") + - detail::rjoin(args, " "), + detail::join(args, " "), ExitCodes::ExtrasError) {} };