mirror of
https://github.com/kepler155c/opus
synced 2025-01-01 03:10:28 +00:00
fix package preload (for cloud-catcher)
This commit is contained in:
parent
cb5f690cf4
commit
9edb4e7d5b
@ -82,8 +82,13 @@ end
|
||||
|
||||
-- Add require and package to the environment
|
||||
return function(env)
|
||||
|
||||
local function standardSearcher(modname)
|
||||
-- Should this be 2 diff searchers ? if yes, installer would need an update
|
||||
if env.package.preload[modname] then
|
||||
return function()
|
||||
return env.package.preload[modname](modname, env)
|
||||
end
|
||||
end
|
||||
if env.package.loaded[modname] then
|
||||
return function()
|
||||
return env.package.loaded[modname]
|
||||
@ -170,6 +175,7 @@ return function(env)
|
||||
path = env.LUA_PATH or _G.LUA_PATH or DEFAULT_PATH,
|
||||
upath = env.LUA_UPATH or _G.LUA_UPATH or DEFAULT_UPATH,
|
||||
config = '/\n:\n?\n!\n-',
|
||||
preload = { },
|
||||
loaded = {
|
||||
coroutine = coroutine,
|
||||
io = io,
|
||||
|
Loading…
Reference in New Issue
Block a user