From 513613d8a87337f1d1f639bc9426165c3b6be62e Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 20 May 2021 13:46:15 +0200 Subject: Cleanup -includeconf error message Remove the erroneous trailing newline '\n'. Also, print only the first value to remove needless redundancy in the error message. Github-Pull: #22002 Rebased-From: fad0867d6ab9430070aa7d60bf7617a6508e0586 --- src/util/system.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/util/system.cpp b/src/util/system.cpp index 3512bb8bff..a21d58a19d 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -337,14 +337,12 @@ bool ArgsManager::ParseParameters(int argc, const char* const argv[], std::strin } // we do not allow -includeconf from command line - bool success = true; if (auto* includes = util::FindKey(m_settings.command_line_options, "includeconf")) { - for (const auto& include : util::SettingsSpan(*includes)) { - error += "-includeconf cannot be used from commandline; -includeconf=" + include.write() + "\n"; - success = false; - } + const auto& include{*util::SettingsSpan(*includes).begin()}; // pick first value as example + error = "-includeconf cannot be used from commandline; -includeconf=" + include.write(); + return false; } - return success; + return true; } Optional ArgsManager::GetArgFlags(const std::string& name) const -- cgit v1.2.3