projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fff15fb
)
util.dependencies: Load luarocks.loader/luarocks.require
author
Matthew Wild
<mwild1@gmail.com>
Thu, 28 Jan 2010 18:10:20 +0000
(18:10 +0000)
committer
Matthew Wild
<mwild1@gmail.com>
Thu, 28 Jan 2010 18:10:20 +0000
(18:10 +0000)
util/dependencies.lua
patch
|
blob
|
history
diff --git
a/util/dependencies.lua
b/util/dependencies.lua
index 13f88f794104f73e039b3559c80f1fbfc58943cd..72a7cafe26b1614b64fa1c4ecc4fd53451f9588f 100644
(file)
--- 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("**************************");