Skip to content

Commit cae6ee4

Browse files
fix(tailscale): serve setup no longer times out on a long success summary
runTailscaleCommand read stderr and waited for exit but never read stdout, so a long Serve summary filled the pipe and blocked the child before it exited. Drain stdout alongside stderr. AI-assisted; verified with the tests and tools listed above.
1 parent 2a0a38e commit cae6ee4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/tailscale/src/tailscale.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,13 @@ const runTailscaleCommand = Effect.fn("tailscale.runTailscaleCommand")(function*
405405
Effect.fail(new TailscaleCommandSpawnError({ ...commandContext, cause })),
406406
),
407407
);
408-
const [stderr, exitCode] = yield* Effect.all(
409-
[collectStderr(child.stderr), child.exitCode.pipe(Effect.map(Number))],
408+
// An unread stdout pipe fills on a long success summary and blocks the child before it exits.
409+
const [, stderr, exitCode] = yield* Effect.all(
410+
[
411+
Stream.runDrain(child.stdout),
412+
collectStderr(child.stderr),
413+
child.exitCode.pipe(Effect.map(Number)),
414+
],
410415
{ concurrency: "unbounded" },
411416
).pipe(
412417
Effect.mapError((cause) => new TailscaleCommandOutputError({ ...commandContext, cause })),

0 commit comments

Comments
 (0)