tony / oxwm

fixed fatal error on fresh install, and changed build file to link straight to lua5.4 Browse files
tonybanters committed 2026-02-15 parent 0bfefa9 commit 420e22d214df9a56c59c527c369d2aa733fc0333
Showing 2 changed files with 5 additions and 7 deletions. UnifiedSplit
+2 −2 build.zig
@@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void {
13 }), 13 }),
14 }); 14 });
15 15
16 - exe.linkSystemLibrary("lua"); 16 + exe.linkSystemLibrary("lua5.4");
17 exe.linkSystemLibrary("X11"); 17 exe.linkSystemLibrary("X11");
18 exe.linkSystemLibrary("Xinerama"); 18 exe.linkSystemLibrary("Xinerama");
19 exe.linkSystemLibrary("Xft"); 19 exe.linkSystemLibrary("Xft");
@@ -52,7 +52,7 @@ pub fn build(b: *std.Build) void {
52 .target = target, 52 .target = target,
53 .optimize = optimize, 53 .optimize = optimize,
54 })); 54 }));
55 - lua_config_tests.linkSystemLibrary("lua"); 55 + lua_config_tests.linkSystemLibrary("lua5.4");
56 lua_config_tests.linkLibC(); 56 lua_config_tests.linkLibC();
57 test_step.dependOn(&b.addRunArtifact(lua_config_tests).step); 57 test_step.dependOn(&b.addRunArtifact(lua_config_tests).step);
58 58
+3 −5 src/main.zig
@@ -113,11 +113,9 @@ fn init_config(allocator: std.mem.Allocator) void {
113 return; 113 return;
114 }; 114 };
115 115
116 - std.fs.makeDirAbsolute(config_dir) catch |err| { 116 + std.fs.cwd().makePath(config_dir) catch |err| {
117 - if (err != error.PathAlreadyExists) { 117 + std.debug.print("error: could not create config directory: {}\n", .{err});
118 - std.debug.print("error: could not create config directory: {}\n", .{err}); 118 + return;
119 - return;
120 - }
121 }; 119 };
122 120
123 var config_path_buf: [512]u8 = undefined; 121 var config_path_buf: [512]u8 = undefined;