瀏覽代碼

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
Pawel Lampe 4 年之前
父節點
當前提交
75ae3164a4
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      main/main.cpp

+ 2 - 0
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;
 		}