mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 23:09:51 +01:00
only return 0 when using -h (#2738)
This commit is contained in:
parent
08310b4af9
commit
7c1dacea09
1 changed files with 8 additions and 1 deletions
|
@ -49,6 +49,7 @@ int main(int argc, char** argv) {
|
|||
} else if (it->compare("-c") == 0 || it->compare("--config") == 0) {
|
||||
if (std::next(it) == args.end()) {
|
||||
help();
|
||||
|
||||
return 1;
|
||||
}
|
||||
std::string next_arg = std::next(it)->c_str();
|
||||
|
@ -66,9 +67,15 @@ int main(int argc, char** argv) {
|
|||
it++;
|
||||
|
||||
continue;
|
||||
} else {
|
||||
} else if (it->compare("-h") == 0 || it->compare("--help") == 0) {
|
||||
help();
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
std::cerr << "[ ERROR ] Unknown option '" << it->c_str() << "'!\n";
|
||||
help();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue