feat: return an error if multiple config files are provided

This commit is contained in:
Eduard Tykhoniuk 2024-09-24 13:35:45 +02:00
parent 4e336530d3
commit b342937072

View file

@ -21,6 +21,11 @@ int main(int argc, char** argv, char** envp) {
return 1;
}
if (!configPath.empty()) {
Debug::log(NONE, "Multiple config files are provided.");
return 1;
}
configPath = argv[++i];
if (configPath[0] == '-') { // Should be fine, because of the null terminator
Debug::log(NONE, "After " + arg + " you should provide a path to a config file.");