Return exit code 0 when running --version or --help
Fixes https://github.com/godotengine/godot/issues/83661
This commit is contained in:
parent
fe7ed984b5
commit
7c3d37ec1d
1 changed files with 5 additions and 1 deletions
|
@ -35,8 +35,12 @@ int main(int argc, char *argv[]) {
|
|||
OS_Server os;
|
||||
|
||||
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
|
||||
if (err != OK)
|
||||
if (err != OK) {
|
||||
if (err == ERR_HELP) { // Returned by --help and --version, so success.
|
||||
return 0;
|
||||
}
|
||||
return 255;
|
||||
}
|
||||
|
||||
if (Main::start())
|
||||
os.run(); // it is actually the OS that decides how to run
|
||||
|
|
Loading…
Reference in a new issue