Diff

prosodyctl @ 2798:2702ee68727d

prosodyctl: Fix to load LuaRocks 2.x if we have it
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Mar 2010 20:12:24 +0000
parent 2786:534e171036ef
line wrap: on
line diff
--- 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"