diff --git a/build.zig.zon b/build.zig.zon index be60e8e18..e2d8d0fb2 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,8 +5,8 @@ .dependencies = .{ // Zig libs .libxev = .{ - .url = "https://github.com/mitchellh/libxev/archive/ecbc161a5dace26a1fd47e494f8be2cfd051cbfb.tar.gz", - .hash = "1220f34357168affd9aab1a3fcafcaff093c44beb75ce1d4d4b75490e90729221771", + .url = "https://github.com/mitchellh/libxev/archive/5ecbc871f3bfa80fb7bf0fa853866cb93b99bc18.tar.gz", + .hash = "1220416854e424601ecc9814afb461a5dc9cf95db5917d82f794594a58ffc723b82c", }, .mach_glfw = .{ .url = "https://github.com/hexops/mach-glfw/archive/16dc95cc7f74ebbbdd848d9a2c3cc4afc5717708.tar.gz", diff --git a/flake.lock b/flake.lock index 725145e79..d82323855 100644 --- a/flake.lock +++ b/flake.lock @@ -276,11 +276,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1697934218, - "narHash": "sha256-6cNN6LGyv0d2pDetK+b73U0x73w7jhFrWvw6LwH1GAw=", + "lastModified": 1698149298, + "narHash": "sha256-c+o5oUprm8wnJWV8wpBVMlSptSIYy7hCk/vJHjVH4KU=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "bdb27f39c9e0fe27d1bc24e4929170b03aa917a4", + "rev": "bbc407a319659eed86d97989ef50cc82e3677c45", "type": "github" }, "original": { diff --git a/src/build/Version.zig b/src/build/Version.zig index 6663c3f73..6c1bbc717 100644 --- a/src/build/Version.zig +++ b/src/build/Version.zig @@ -19,19 +19,19 @@ branch: []const u8, pub fn detect(b: *std.Build) !Version { // Execute a bunch of git commands to determine the automatic version. var code: u8 = 0; - const branch = try b.execAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "rev-parse", "--abbrev-ref", "HEAD" }, &code, .Ignore); + const branch = try b.runAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "rev-parse", "--abbrev-ref", "HEAD" }, &code, .Ignore); const short_hash = short_hash: { - const output = try b.execAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "log", "--pretty=format:%h", "-n", "1" }, &code, .Ignore); + const output = try b.runAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "log", "--pretty=format:%h", "-n", "1" }, &code, .Ignore); break :short_hash std.mem.trimRight(u8, output, "\r\n "); }; - const tag = b.execAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "describe", "--exact-match", "--tags" }, &code, .Ignore) catch |err| switch (err) { + const tag = b.runAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "describe", "--exact-match", "--tags" }, &code, .Ignore) catch |err| switch (err) { error.ExitCodeFailure => "", // expected else => return err, }; - _ = b.execAllowFail(&[_][]const u8{ + _ = b.runAllowFail(&[_][]const u8{ "git", "-C", b.build_root.path orelse ".", diff --git a/src/os/homedir.zig b/src/os/homedir.zig index 548f137e7..5790c4ce9 100644 --- a/src/os/homedir.zig +++ b/src/os/homedir.zig @@ -33,7 +33,7 @@ fn homeUnix(buf: []u8) !?[]u8 { // If we're on darwin, we try the directory service. I'm not sure if there // is a Mac API to do this but if so we can link to that... if (builtin.os.tag == .macos) { - const exec = try std.ChildProcess.exec(.{ + const run = try std.ChildProcess.run(.{ .allocator = fba.allocator(), .argv = &[_][]const u8{ "/bin/sh", @@ -43,8 +43,8 @@ fn homeUnix(buf: []u8) !?[]u8 { .max_output_bytes = fba.buffer.len / 2, }); - if (exec.term == .Exited and exec.term.Exited == 0) { - const result = trimSpace(exec.stdout); + if (run.term == .Exited and run.term.Exited == 0) { + const result = trimSpace(run.stdout); if (buf.len < result.len) return Error.BufferTooSmall; std.mem.copy(u8, buf, result); return buf[0..result.len]; @@ -62,14 +62,14 @@ fn homeUnix(buf: []u8) !?[]u8 { // If all else fails, have the shell tell us... fba.reset(); - const exec = try std.ChildProcess.exec(.{ + const run = try std.ChildProcess.run(.{ .allocator = fba.allocator(), .argv = &[_][]const u8{ "/bin/sh", "-c", "cd && pwd" }, .max_output_bytes = fba.buffer.len / 2, }); - if (exec.term == .Exited and exec.term.Exited == 0) { - const result = trimSpace(exec.stdout); + if (run.term == .Exited and run.term.Exited == 0) { + const result = trimSpace(run.stdout); if (buf.len < result.len) return Error.BufferTooSmall; std.mem.copy(u8, buf, result); return buf[0..result.len];