aboutsummaryrefslogtreecommitdiffstats
path: root/util/dependencies.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-28 18:10:20 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-28 18:10:20 +0000
commit7086dd06fe621c3369388bb4a1ac9ef1deaa7635 (patch)
tree3e91e10871f6a093b3adc768a10d794e2b522e8e /util/dependencies.lua
parent27ff687531a5e9c1cbc991b2fa53829089e2a254 (diff)
downloadprosody-7086dd06fe621c3369388bb4a1ac9ef1deaa7635.tar.gz
prosody-7086dd06fe621c3369388bb4a1ac9ef1deaa7635.zip
util.dependencies: Load luarocks.loader/luarocks.require
Diffstat (limited to 'util/dependencies.lua')
-rw-r--r--util/dependencies.lua5
1 files changed, 5 insertions, 0 deletions
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("**************************");