mirror of
https://github.com/hyprwm/hypridle.git
synced 2025-05-13 05:30:40 +01:00
feat: return an error if multiple config files are provided
This commit is contained in:
parent
4e336530d3
commit
b342937072
1 changed files with 5 additions and 0 deletions
|
@ -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.");
|
||||
|
|
Loading…
Reference in a new issue