mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
only return 0 when using -h (#2738)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user