aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-28 18:10:20 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-28 18:10:20 +0000
commit15fb8092199a74af4da602d2c93ca3f0a825d21e (patch)
tree348290f1ef7ec77cd10cdd0a66f88a9f8a1bb042
parent24aaf5e7884fbecd439c841fdce98292e7c6429f (diff)
downloadprosody-15fb8092199a74af4da602d2c93ca3f0a825d21e.tar.gz
prosody-15fb8092199a74af4da602d2c93ca3f0a825d21e.zip
util.dependencies: Load luarocks.loader/luarocks.require
-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