Merge pull request #95656 from anvilfolk/gdscript-docs-quit

Fix Godot not quitting with `--doctool --gdscript-docs`.
This commit is contained in:
Rémi Verschelde 2024-08-17 00:47:17 +02:00
commit 1bd740d18d
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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;