prosodyctl: Fix to load LuaRocks 2.x if we have it
authorMatthew Wild <mwild1@gmail.com>
Wed, 03 Mar 2010 20:12:24 +0000
changeset 2798 2702ee68727d
parent 2797 76777fee99b7
child 2799 0dc7b5ceaf8f
prosodyctl: Fix to load LuaRocks 2.x if we have it
prosodyctl
--- a/prosodyctl	Thu Jan 28 18:10:20 2010 +0000
+++ b/prosodyctl	Wed Mar 03 20:12:24 2010 +0000
@@ -30,7 +30,10 @@
 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"