Explorar o código

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

(cherry picked from commit 75ae3164a415c84cda6ff2b0c6ee6d57d777f73a)
Pawel Lampe %!s(int64=4) %!d(string=hai) anos
pai
achega
cc0479a17e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      main/main.cpp

+ 3 - 1
main/main.cpp

@@ -1681,7 +1681,9 @@ bool Main::start() {
 
 		if (check_only) {
 			if (!script_res->is_valid()) {
-				OS::get_singleton()->set_exit_code(1);
+				OS::get_singleton()->set_exit_code(EXIT_FAILURE);
+			} else {
+				OS::get_singleton()->set_exit_code(EXIT_SUCCESS);
 			}
 			return false;
 		}