From 9feb9aef42616f6a1639ce8c5ba230b957c94fb8 Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Mon, 25 Nov 2019 22:39:51 +0100 Subject: [PATCH] godot exit code improvement for --script --check-only, fixes #33895 this commit causes godot executable to return non-zero exit code once invalid script is passed via --script during --check-only --- main/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index c34d3da618c..22a31d597e6 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1517,6 +1517,9 @@ bool Main::start() { ERR_FAIL_COND_V_MSG(script_res.is_null(), false, "Can't load script: " + script); if (check_only) { + if (!script_res->is_valid()) { + OS::get_singleton()->set_exit_code(1); + } return false; }