forked from LordMZTE/confgen
fix: confgenfs source file
This commit is contained in:
parent
624485b360
commit
d2d1b47b51
3 changed files with 4 additions and 4 deletions
|
@ -65,7 +65,7 @@ pub fn build(b: *std.Build) void {
|
|||
if (confgenfs) {
|
||||
const confgenfs_exe = b.addExecutable(.{
|
||||
.name = "confgenfs",
|
||||
.root_source_file = b.path("confgen/main.zig"),
|
||||
.root_source_file = b.path("confgenfs/main.zig"),
|
||||
.link_libc = true,
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
|
|
|
@ -582,13 +582,13 @@ fn generateOptsJSON(self: *FileSystem) ![]const u8 {
|
|||
|
||||
fn eval(self: *FileSystem, code: []const u8) !void {
|
||||
if (libcg.c.luaL_loadbuffer(self.l, code.ptr, code.len, "<cgfs-eval>") != 0) {
|
||||
std.log.err("unable to load eval code: {s}", .{libcg.ffi.luaToString(self.l, -1)});
|
||||
std.log.err("unable to load eval code: {?s}", .{libcg.ffi.luaToString(self.l, -1)});
|
||||
libcg.c.lua_pop(self.l, 1);
|
||||
return error.InvalidEvalCode;
|
||||
}
|
||||
|
||||
if (libcg.c.lua_pcall(self.l, 0, 0, 0) != 0) {
|
||||
std.log.err("unable to run eval code: {s}", .{libcg.ffi.luaToString(self.l, -1)});
|
||||
std.log.err("unable to run eval code: {?s}", .{libcg.ffi.luaToString(self.l, -1)});
|
||||
libcg.c.lua_pop(self.l, 1);
|
||||
return error.InvalidEvalCode;
|
||||
}
|
||||
|
|
|
@ -448,7 +448,7 @@ fn lDoTemplateFile(l: *c.lua_State) !c_int {
|
|||
tmpl_code.name.ptr,
|
||||
) != 0) {
|
||||
// TODO: turn this into a lua error
|
||||
std.log.err("loading template: {?s}", .{ffi.luaToString(l, -1)});
|
||||
std.log.err("loading template: {?s}", .{ffi.luaConvertString(l, -1)});
|
||||
return error.LoadTemplate;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue