From d38d76d039a20bfcbc0a8612fee1c9a37cc21c78 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sat, 2 Jul 2022 01:05:20 +0200 Subject: Fix exit code of --help and --version, and test them in CI Corrects prior regression which caused ERROR output and exit code of 1. --- platform/linuxbsd/godot_linuxbsd.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/linuxbsd') diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp index 9fe00568fb..91a260182e 100644 --- a/platform/linuxbsd/godot_linuxbsd.cpp +++ b/platform/linuxbsd/godot_linuxbsd.cpp @@ -61,6 +61,10 @@ int main(int argc, char *argv[]) { Error err = Main::setup(argv[0], argc - 1, &argv[1]); if (err != OK) { free(cwd); + + if (err == ERR_HELP) { // Returned by --help and --version, so success. + return 0; + } return 255; } -- cgit v1.2.3