wordcraft/apps/wordcraft-cli/tests
Valentin Klein e5c55c0fc5
CLI: a closed stdout ends quietly instead of panicking (#508) (#510)
`println!` panics when stdout is a closed pipe, so `wordcraft-cli commands
--json | head` aborted with exit 101. Every stdout write now goes through a
locked handle with `writeln!` and propagates `io::Error`; a BrokenPipe becomes
`Failure::StdoutClosed`, which `main` treats as a normal exit 0. The MCP stdio
server's BrokenPipe takes the same path, so a client that hangs up ends the
server cleanly. Real errors still go to stderr with exit 1.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-11 11:13:01 -04:00
..
closed_stdout.rs CLI: a closed stdout ends quietly instead of panicking (#508) (#510) 2026-10-11 11:13:01 -04:00