Skip to content

Commit 8491878

Browse files
committed
test(at): avoid bun stdin pipe flake in cli harness
1 parent 2c9dd7d commit 8491878

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎tests/at/agents-cli.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ async function runAgentsCli(args: string[], env?: NodeJS.ProcessEnv, stdinData?:
8181
: spawn(process.execPath, ["run", "src/cli.ts", "--", "agents", ...args], {
8282
cwd: REPO_ROOT,
8383
env: env ?? createCleanEnv(),
84-
stdio: ["pipe", "pipe", "pipe"],
84+
// On CI, a writable stdin pipe for Bun child processes can occasionally
85+
// keep the CLI invocation from closing promptly even though these
86+
// commands never read stdin. Use `ignore` unless stdin is explicitly
87+
// redirected via the shell path above.
88+
stdio: ["ignore", "pipe", "pipe"],
8589
});
8690

8791
let stdout = "";
@@ -93,10 +97,6 @@ async function runAgentsCli(args: string[], env?: NodeJS.ProcessEnv, stdinData?:
9397
child.stdout.on("data", (chunk: string) => { stdout += chunk; });
9498
child.stderr.on("data", (chunk: string) => { stderr += chunk; });
9599

96-
if (!stdinPath && child.stdin) {
97-
child.stdin.end();
98-
}
99-
100100
// Handle process error (e.g. ENOENT, spawn failure)
101101
child.once("error", (err) => {
102102
if (settled) return;

0 commit comments

Comments
 (0)