Skip to content

Commit

Permalink
godot exit code improvement for --script --check-only, fixes godoteng…
Browse files Browse the repository at this point in the history
…ine#33895

this commit causes godot executable to return non-zero exit code
once invalid script is passed via --script during --check-only
  • Loading branch information
Scony authored and Pawel Lampe committed Nov 26, 2019
1 parent 37b230f commit 9feb9ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9feb9ae

Please sign in to comment.