From 8781a6d4f9d5840c7c9954706c972564bd40e76e Mon Sep 17 00:00:00 2001 From: forever2k38 Date: Tue, 13 Oct 2026 22:10:24 +0200 Subject: feat: copy build config instead of just makeopts --- src/pow_lua.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/pow_lua.c') diff --git a/src/pow_lua.c b/src/pow_lua.c index 642077f..b3fa69b 100644 --- a/src/pow_lua.c +++ b/src/pow_lua.c @@ -305,8 +305,18 @@ int pow_lua_load(lua_State *L, pow_config *cfg) { lua_createtable(L, 0, 1); - lua_pushstring(L, cfg->makeopts); - lua_setfield(L, -2, "makeopts"); + lua_setfield(L, -2, "config"); + + lua_rawgeti(cfg->L_cfg, LUA_REGISTRYINDEX, cfg->build_cfg_ref); + + if (!lua_istable(cfg->L_cfg, -1)) { + pow_log_error("failed to initialize lua: config.build is not a table"); + lua_pop(cfg->L_cfg, 1); + + return 1; + } + + lua_xmove(cfg->L_cfg, L, 1); lua_setfield(L, -2, "config"); @@ -314,3 +324,4 @@ int pow_lua_load(lua_State *L, pow_config *cfg) { return 0; } + -- cgit v1.3