aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2025-04-09 10:54:01 +0100
committerMatthew Wild <mwild1@gmail.com>2025-04-09 10:54:01 +0100
commit775a4d3cf6bf8c7675e1ded0f5edf7c35e622043 (patch)
treeb37d9b165304e0f68971c19a93b68fae98f6425d /util/prosodyctl
parent6767e771ff3b09ee489392b762364f22bb7e5891 (diff)
downloadprosody-775a4d3cf6bf8c7675e1ded0f5edf7c35e622043.tar.gz
prosody-775a4d3cf6bf8c7675e1ded0f5edf7c35e622043.zip
prosodyctl check config: List modules which Prosody cannot successfully load
Diffstat (limited to 'util/prosodyctl')
-rw-r--r--util/prosodyctl/check.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index 622e475e..c46755af 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -644,6 +644,25 @@ local function check(arg)
print(" been deprecated. You can safely remove it.");
end
+ local load_failures = {};
+ for mod_name in all_modules do
+ local mod, err = modulemanager.loader:load_resource(mod_name, nil);
+ if not mod then
+ load_failures[mod_name] = err;
+ end
+ end
+
+ if next(load_failures) ~= nil then
+ print("");
+ print(" The following modules failed to load:");
+ print("");
+ for mod_name, err in it.sorted_pairs(load_failures) do
+ print((" mod_%s: %s"):format(mod_name, err));
+ end
+ print("")
+ print(" Check for typos and remove any obsolete/incompatible modules from your config.");
+ end
+
for host, host_config in pairs(config) do --luacheck: ignore 213/host
if type(rawget(host_config, "storage")) == "string" and rawget(host_config, "default_storage") then
print("");