aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprosody4
1 files changed, 3 insertions, 1 deletions
diff --git a/prosody b/prosody
index e4e5bc47..40aeac5e 100755
--- a/prosody
+++ b/prosody
@@ -31,7 +31,9 @@ if CFG_DATADIR then
end
-- Required to be able to find packages installed with luarocks
-pcall(require, "luarocks.require")
+if not pcall(require, "luarocks.loader") then -- Try LuaRocks 2.x
+ pcall(require, "luarocks.require") -- Try LuaRocks 1.x
+end
-- Replace require with one that doesn't pollute _G
do