Don't refresh addon cache if running without addons

This allows WML unit tests to be successfully run locally even if you have a local addon that does not have an _info.cfg or _server.pbl.
This commit is contained in:
Celtic Minstrel 2021-02-24 20:05:35 -05:00
parent c46a2171f2
commit 1ff1ada25c

View file

@ -771,7 +771,7 @@ static int do_gameloop(const std::vector<std::string>& args)
game_config_manager config_manager(cmdline_opts);
gui2::dialogs::loading_screen::display([&res, &config_manager]() {
gui2::dialogs::loading_screen::display([&res, &config_manager, &cmdline_opts]() {
gui2::dialogs::loading_screen::progress(loading_stage::load_config);
res = config_manager.init_game_config(game_config_manager::NO_FORCE_RELOAD);
@ -788,9 +788,11 @@ static int do_gameloop(const std::vector<std::string>& args)
return;
}
gui2::dialogs::loading_screen::progress(loading_stage::refresh_addons);
if(!game_config::no_addons && !cmdline_opts.noaddons) {
gui2::dialogs::loading_screen::progress(loading_stage::refresh_addons);
refresh_addon_version_info_cache();
refresh_addon_version_info_cache();
}
});
if(res == false) {