mirror of
https://github.com/bjc/prosody.git
synced 2025-04-07 07:07:38 +03:00
core.modulemanager: Add compat for LuaRocks 2.x
This commit is contained in:
parent
58be93c184
commit
387a03e1d3
1 changed files with 7 additions and 0 deletions
|
@ -206,6 +206,13 @@ local function do_load_module(host, module_name, state)
|
||||||
local luarocks_path = custom_plugins.."/lib/luarocks/rocks-"..lua_version;
|
local luarocks_path = custom_plugins.."/lib/luarocks/rocks-"..lua_version;
|
||||||
local manifest_filename = luarocks_path.."/manifest";
|
local manifest_filename = luarocks_path.."/manifest";
|
||||||
local load_manifest, err = envload.envloadfile(manifest_filename, 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
|
if not load_manifest then
|
||||||
log("error", "Could not load manifest of installed plugins: %s", err, load_manifest);
|
log("error", "Could not load manifest of installed plugins: %s", err, load_manifest);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue