summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
authorJan Haller <bromeon@gmail.com>2022-07-02 01:05:20 +0200
committerJan Haller <bromeon@gmail.com>2022-07-02 01:17:35 +0200
commitd38d76d039a20bfcbc0a8612fee1c9a37cc21c78 (patch)
treeb37c34b08060ca85c12720d7587178defd425658 /platform/iphone
parenta2459c7d35eeaeea8b1d4fa9ce6c9cbe74f11643 (diff)
Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/godot_iphone.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/iphone/godot_iphone.mm b/platform/iphone/godot_iphone.mm
index 49474ef554..59fdfa9dcd 100644
--- a/platform/iphone/godot_iphone.mm
+++ b/platform/iphone/godot_iphone.mm
@@ -112,7 +112,10 @@ int iphone_main(int argc, char **argv, String data_dir, String cache_dir) {
Error err = Main::setup(fargv[0], argc - 1, &fargv[1], false);
printf("setup %i\n", err);
- if (err != OK) {
+
+ if (err == ERR_HELP) { // Returned by --help and --version, so success.
+ return 0;
+ } else if (err != OK) {
return 255;
}