From 950ea4d51eb5667d0258dbead49cc8be82a6e7bf Mon Sep 17 00:00:00 2001 From: Austin Pickett Date: Tue, 6 Oct 2026 13:43:46 -0400 Subject: [PATCH] test(desktop): shellSshDouble tolerates a child that exits before reading stdin The spawn fixtures run commands that never read stdin, so on a fast Linux runner the shell can exit before shellExec's stdin write lands and the write fails with EPIPE. The stream had no error listener, so vitest reported it as an unhandled error and failed the electron project even though every test passed. The close verdict is the result; the EPIPE is noise. --- apps/desktop/electron/remote-ssh-exec.test-helpers.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/desktop/electron/remote-ssh-exec.test-helpers.ts b/apps/desktop/electron/remote-ssh-exec.test-helpers.ts index be94bd86ea..0b460e7de9 100644 --- a/apps/desktop/electron/remote-ssh-exec.test-helpers.ts +++ b/apps/desktop/electron/remote-ssh-exec.test-helpers.ts @@ -49,6 +49,10 @@ export function shellExec( failure.stderr = stderr reject(failure) }) + // A command that exits without reading stdin (the spawn fixtures never do) + // closes the pipe under this write; the `close` verdict above is the result, + // so an EPIPE here must not surface as an unhandled error. + child.stdin.once('error', () => {}) child.stdin.end(stdinData ?? '') }) }