blob: 4853c3876fcaccb852d602539e8e24e6dcd253a5 [file] [log] [blame]
local os = require("os")
local old_require = require
if os.getenv('LUA_OLD_INIT') then
assert(loadstring(os.getenv('LUA_OLD_INIT')))()
else
require("luarocks.require")
end
local luarocks_require = require
function require(module, ...)
if module == "json" or module:match("^json%.") then
return old_require(module, ...)
end
return luarocks_require(module, ...)
end