From 75ae3164a415c84cda6ff2b0c6ee6d57d777f73a Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Thu, 21 Oct 2021 20:34:43 +0200 Subject: [PATCH] Fix exit code for --script --check-only, fixes #54087 this commit makes godot executable to return zero exit code once a valid script is passed via --script during --check-only --- main/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index f0bc51c10f9..d4a6216e353 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2072,6 +2072,8 @@ bool Main::start() { if (check_only) { if (!script_res->is_valid()) { OS::get_singleton()->set_exit_code(EXIT_FAILURE); + } else { + OS::get_singleton()->set_exit_code(EXIT_SUCCESS); } return false; }