diff options
Diffstat (limited to 'src/exe.zig')
| -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; } |