mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Cleanup -includeconf error message
Remove the erroneous trailing newline '\n'. Also, print only the first value to remove needless redundancy in the error message.
This commit is contained in:
parent
99b86594df
commit
5f18d337d4
2 changed files with 5 additions and 7 deletions
|
|
@ -325,14 +325,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<unsigned int> ArgsManager::GetArgFlags(const std::string& name) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue