Fixes to lua:run
parent
94acad1a9b
commit
396c9fc60a
|
@ -64,12 +64,11 @@ export async function luaRunCommand(
|
||||||
true,
|
true,
|
||||||
configContainer,
|
configContainer,
|
||||||
);
|
);
|
||||||
await serverSystem.init(false);
|
await serverSystem.init(false, false);
|
||||||
console.log("Ok ready");
|
|
||||||
// Then evaluate it
|
// Then evaluate it
|
||||||
const luaFile = await Deno.readTextFile(scriptPath);
|
const luaFile = await Deno.readTextFile(scriptPath);
|
||||||
const chunk = parse(luaFile, {});
|
const chunk = parse(luaFile, {});
|
||||||
const env = new LuaEnv(luaBuildStandardEnv());
|
const env = serverSystem.spaceLuaEnv.env;
|
||||||
const sf = new LuaStackFrame(new LuaEnv(), chunk.ctx);
|
const sf = new LuaStackFrame(new LuaEnv(), chunk.ctx);
|
||||||
sf.threadLocal.setLocal("_GLOBAL", env);
|
sf.threadLocal.setLocal("_GLOBAL", env);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue