From 7086dd06fe621c3369388bb4a1ac9ef1deaa7635 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Jan 2010 18:10:20 +0000 Subject: util.dependencies: Load luarocks.loader/luarocks.require --- util/dependencies.lua | 5 +++++ 1 file changed, 5 insertions(+) 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("**************************"); -- cgit v1.2.3