Fixes to lua:run

pull/1212/head
Zef Hemel 2025-01-16 15:31:52 +01:00
parent 94acad1a9b
commit 396c9fc60a
1 changed files with 2 additions and 3 deletions

View File

@ -64,12 +64,11 @@ export async function luaRunCommand(
true,
configContainer,
);
await serverSystem.init(false);
console.log("Ok ready");
await serverSystem.init(false, false);
// Then evaluate it
const luaFile = await Deno.readTextFile(scriptPath);
const chunk = parse(luaFile, {});
const env = new LuaEnv(luaBuildStandardEnv());
const env = serverSystem.spaceLuaEnv.env;
const sf = new LuaStackFrame(new LuaEnv(), chunk.ctx);
sf.threadLocal.setLocal("_GLOBAL", env);