diff --git a/main/main.cpp b/main/main.cpp index a594bf76b12..c500b862304 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2437,9 +2437,11 @@ bool Main::iteration() { auto_build_solutions = false; // Only relevant when running the editor. if (!editor) { + OS::get_singleton()->set_exit_code(EXIT_FAILURE); ERR_FAIL_V_MSG(true, "Command line option --build-solutions was passed, but no project is being edited. Aborting."); } if (!EditorNode::get_singleton()->call_build()) { + OS::get_singleton()->set_exit_code(EXIT_FAILURE); ERR_FAIL_V_MSG(true, "Command line option --build-solutions was passed, but the build callback failed. Aborting."); } }