1
0
Fork 0

Return exit code 0 when running --version or --help

Fixes https://github.com/godotengine/godot/issues/83661

(cherry picked from commit 7c3d37ec1d)
This commit is contained in:
TurboHz 2023-10-20 11:21:33 +02:00 committed by Rémi Verschelde
parent a785276e02
commit 461e26a24d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 1 deletions

View File

@ -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