From 4f1eef735bd4d7a207b9fa73016dfad01972f66e Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 24 Jun 2025 02:36:31 -0700 Subject: [PATCH] Update subprocess.zig --- src/bun.js/api/bun/subprocess.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index ea44b1e655..70783d5b9c 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -1303,8 +1303,10 @@ const Writable = union(enum) { const assign_result = pipe.assignToStream(&stdio.readable_stream, event_loop.global); if (assign_result.toError()) |err| { pipe.deref(); + subprocess.deref(); return event_loop.global.throwValue(err); } + promise_for_stream.* = assign_result; } return Writable{