aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-03 20:12:24 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-03 20:12:24 +0000
commitc9740f1fcf80ed25c1ab18bfba990c6d4fbe6b15 (patch)
tree27e10c86b0be40134bdd5d77c0a4ed22538de305
parent15fb8092199a74af4da602d2c93ca3f0a825d21e (diff)
downloadprosody-c9740f1fcf80ed25c1ab18bfba990c6d4fbe6b15.tar.gz
prosody-c9740f1fcf80ed25c1ab18bfba990c6d4fbe6b15.zip
prosodyctl: Fix to load LuaRocks 2.x if we have it
-rwxr-xr-xprosodyctl5
1 files changed, 4 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index a44dfada..89368a78 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -30,7 +30,10 @@ 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
+
config = require "core.configmanager"