From 13b20820ba78bff60a8ec293c8c66159e0a949ec Mon Sep 17 00:00:00 2001 From: ocean Date: Fri, 16 Aug 2024 15:22:17 -0400 Subject: [PATCH] Fix Godot not quitting with `--doctool --gdscript-docs`. --- main/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 20968d3971c..a2c807a0a14 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1511,6 +1511,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph main_args.push_back(arg); main_args.push_back(N->get()); N = N->next(); + // GDScript docgen requires Autoloads, but loading those also creates a main loop. + // This forces main loop to quit without adding more GDScript-specific exceptions to setup. + quit_after = 1; } else { OS::get_singleton()->print("Missing relative or absolute path to project for --gdscript-docs, aborting.\n"); goto error;