# HG changeset patch # User Kim Alvefur # Date 1602104052 -7200 # Node ID 82d6c8e627b9f37b090cf7ed0d2d32acbf47f16d # Parent 87d6f5924ae9bc062489ba4b6fa67f89a64c67e6 core.modulemanager: Add compat for LuaRocks 2.x diff -r 87d6f5924ae9 -r 82d6c8e627b9 core/modulemanager.lua --- a/core/modulemanager.lua Wed Oct 07 16:10:51 2020 +0200 +++ b/core/modulemanager.lua Wed Oct 07 22:54:12 2020 +0200 @@ -207,6 +207,13 @@ 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);