aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-07 22:54:12 +0200
committerKim Alvefur <zash@zash.se>2020-10-07 22:54:12 +0200
commit387a03e1d3fd622dde78b2e4e66abb109f7c40cd (patch)
treef74c7a7eea593f5325038961a729fbdae4836a03 /core
parent58be93c18484c9e12f276f5bb0f8d49e3d833b47 (diff)
downloadprosody-387a03e1d3fd622dde78b2e4e66abb109f7c40cd.tar.gz
prosody-387a03e1d3fd622dde78b2e4e66abb109f7c40cd.zip
core.modulemanager: Add compat for LuaRocks 2.x
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index ea5a1324..b89c82d7 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -207,6 +207,13 @@ local function do_load_module(host, module_name, state)
local manifest_filename = luarocks_path.."/manifest";
local load_manifest, err = envload.envloadfile(manifest_filename, manifest);
if not load_manifest then
+ -- COMPAT Luarocks 2.x
+ log("debug", "Could not load LuaRocks 3.x manifest, trying 2.x", err);
+ luarocks_path = custom_plugins.."/lib/luarocks/rocks-"..lua_version;
+ manifest_filename = luarocks_path.."/manifest";
+ load_manifest, err = envload.envloadfile(manifest_filename, manifest);
+ end
+ if not load_manifest then
log("error", "Could not load manifest of installed plugins: %s", err, load_manifest);
else
local ok, err = xpcall(load_manifest, debug_traceback);