diff options
author | Pawel Lampe <pawel.lampe@gmail.com> | 2019-11-25 22:39:51 +0100 |
---|---|---|
committer | Pawel Lampe <pawel.lampe@nokia.com> | 2019-11-26 10:53:42 +0100 |
commit | 9feb9aef42616f6a1639ce8c5ba230b957c94fb8 (patch) | |
tree | f236c2751a44a106f36bc2d4cf291df67babbf97 /main | |
parent | 37b230fe3af3c7e20a6f938d03b61a79b117d354 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp index c34d3da618..22a31d597e 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; } |