Zig 0.15: zig build test

This commit is contained in:
Mitchell Hashimoto
2025-10-01 13:10:40 -07:00
parent 3770f97608
commit cb295b84a0
66 changed files with 1264 additions and 1144 deletions

View File

@@ -107,12 +107,18 @@ pub const Action = enum {
// for all commands by just changing this one place.
if (std.mem.eql(u8, field.name, @tagName(self))) {
const stdout = std.io.getStdOut().writer();
var buffer: [1024]u8 = undefined;
var stdout_writer = std.fs.File.stdout().writer(&buffer);
const stdout = &stdout_writer.interface;
const text = @field(help_strings.Action, field.name) ++ "\n";
stdout.writeAll(text) catch |write_err| {
std.log.warn("failed to write help text: {}\n", .{write_err});
break :err 1;
};
stdout.flush() catch |flush_err| {
std.log.warn("failed to flush help text: {}\n", .{flush_err});
break :err 1;
};
break :err 0;
}