From 7c3d37ec1da6166e5730c232819d69263b4b8554 Mon Sep 17 00:00:00 2001 From: TurboHz Date: Fri, 20 Oct 2023 11:21:33 +0200 Subject: [PATCH] Return exit code 0 when running --version or --help Fixes https://github.com/godotengine/godot/issues/83661 --- platform/server/godot_server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/server/godot_server.cpp b/platform/server/godot_server.cpp index 7ff5b61d1a3..bbf4f45c973 100644 --- a/platform/server/godot_server.cpp +++ b/platform/server/godot_server.cpp @@ -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