prosody: Log error message when failing to open ports
[prosody.git] / util / dependencies.lua
index 13f88f794104f73e039b3559c80f1fbfc58943cd..72a7cafe26b1614b64fa1c4ecc4fd53451f9588f 100644 (file)
@@ -10,6 +10,11 @@ module("dependencies", package.seeall)
 
 function softreq(...) local ok, lib =  pcall(require, ...); if ok then return lib; else return nil, lib; end end
 
+-- Required to be able to find packages installed with luarocks
+if not softreq "luarocks.loader" then -- LuaRocks 2.x
+       softreq "luarocks.require"; -- LuaRocks <1.x
+end
+
 function missingdep(name, sources, msg)
        print("");
        print("**************************");