From 7aea5cf0a32a4aa4dce4190219adde60388aaf98 Mon Sep 17 00:00:00 2001 From: Loris Cro Date: Thu, 25 Jul 2024 19:07:05 +0200 Subject: [PATCH] fix git issue with superhtml as a dependency --- build.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 1c2467d..b97fa04 100644 --- a/build.zig +++ b/build.zig @@ -273,14 +273,15 @@ const Version = union(Kind) { }; fn getVersion(b: *std.Build) Version { const git_path = b.findProgram(&.{"git"}, &.{}) catch return .unknown; + var out: u8 = undefined; const git_describe = std.mem.trim( u8, - b.run(&[_][]const u8{ + b.runAllowFail(&[_][]const u8{ git_path, "-C", b.build_root.path.?, "describe", "--match", "*.*.*", "--tags", - }), + }, &out, .Ignore) catch return .unknown, " \n\r", );