aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-05-20 13:46:15 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-21 10:54:12 +0200
commitfad0867d6ab9430070aa7d60bf7617a6508e0586 (patch)
tree127d0af3070e2ff91c1369450868c5dce712a6e1 /src
parentfa9f711c3746ca3962f15224285a453744cd45b3 (diff)
Cleanup -includeconf error message
Remove the erroneous trailing newline '\n'. Also, print only the first value to remove needless redundancy in the error message.
Diffstat (limited to 'src')
-rw-r--r--src/util/system.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 00cbca1c36..76d63074e4 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -366,14 +366,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;
}
std::optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) const