aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-08-19 12:31:36 +0100
committerGitHub <noreply@github.com>2022-08-19 12:31:36 +0100
commit2d10fa786792a27adb4097abe8c92f36cf47e6ce (patch)
tree82981f63a026156ccdee66dc8650d6eea52157df /src/server.cpp
parent8c29c4f620a45385ac4e906c1f50d1df7d1edba9 (diff)
downloadminetest-2d10fa786792a27adb4097abe8c92f36cf47e6ce.tar.xz
Prevent loading a world with unresolved dependencies (#12542)
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 93767da9d..06e7b9d50 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -425,14 +425,10 @@ void Server::init()
m_modmgr = std::make_unique<ServerModManager>(m_path_world);
std::vector<ModSpec> unsatisfied_mods = m_modmgr->getUnsatisfiedMods();
-
// complain about mods with unsatisfied dependencies
if (!m_modmgr->isConsistent()) {
- m_modmgr->printUnsatisfiedModsError();
-
- warningstream
- << "You have unsatisfied dependencies, loading your world anyway. "
- << "This will become a fatal error in the future." << std::endl;
+ std::string error = m_modmgr->getUnsatisfiedModsError();
+ throw ServerError(error);
}
//lock environment