From 380931bc9588268fa09485be863d2fd3806f8f0d Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 29 Jan 2026 20:45:16 +0100 Subject: indicate when the exe.shell process exits unclean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- src/exe.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/exe.zig b/src/exe.zig index c8b5b38..fc24c50 100644 --- a/src/exe.zig +++ b/src/exe.zig @@ -142,7 +142,7 @@ pub fn captureStdout(ctx: *Context, argv: []const []const u8, env_map: ?*std.pro try w.flush(); const result = try p.wait(); - _ = result; + if (result.Exited != 0) return error.NonZeroExitCode; } pub fn shell(ctx: *Context, command: []const u8, env_map: ?*std.process.EnvMap) !void { @@ -158,10 +158,12 @@ pub fn shell(ctx: *Context, command: []const u8, env_map: ?*std.process.EnvMap) command, }, std.heap.page_allocator); + p.stdout_behavior = .Inherit; + p.stderr_behavior = .Inherit; p.progress_node = ctx.progress_nodes.getLast(); p.env_map = env_map; try p.spawn(); const result = try p.wait(); - _ = result; + if (result.Exited != 0) return error.NonZeroExitCode; } -- cgit 1.4.1