`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> |
||
|---|---|---|
| .. | ||
| wordcraft | ||
| wordcraft-cli | ||
| wordcraft-web | ||