X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fdependencies.lua;h=72a7cafe26b1614b64fa1c4ecc4fd53451f9588f;hb=4899743c62b06d41dd6092fa3435bb64b2d9ce98;hp=13f88f794104f73e039b3559c80f1fbfc58943cd;hpb=aa0bf6b5501f2c90dae2014d4f74a5bdb035e3af;p=prosody.git diff --git a/util/dependencies.lua b/util/dependencies.lua index 13f88f79..72a7cafe 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -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("**************************");