diff options
| author | Robert Günzler <r@gnzler.io> | 2026-01-29 20:45:16 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-01-29 21:38:25 +0100 |
| commit | 380931bc9588268fa09485be863d2fd3806f8f0d (patch) | |
| tree | 2d917c68589ae4cf2ade99358e155528e3e3a488 | |
| parent | f0c07e7688a24ae2cb42ba26675b7fb9d15157c9 (diff) | |
| download | site-380931bc9588268fa09485be863d2fd3806f8f0d.tar.gz | |
indicate when the exe.shell process exits unclean
Signed-off-by: Robert Günzler <r@gnzler.io>
| -rw-r--r-- | src/exe.zig | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |