mirror of
https://github.com/hyprwm/hypridle.git
synced 2025-05-13 05:30:40 +01:00
fix: Do not crash if the last CLI parameter was -c
This commit is contained in:
parent
22b058b47a
commit
f60bff7e3d
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,11 @@ int main(int argc, char** argv, char** envp) {
|
|||
Debug::quiet = true;
|
||||
|
||||
else if (arg == "--config" || arg == "-c") {
|
||||
if (i + 1 >= argc) {
|
||||
Debug::log(NONE, "Please provide a path to a config file.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
configPath = argv[++i];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue