mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-09-14 20:00:38 +08:00
43b2f8ef86
`Cmd::delayed_stream` wrote its progress line and every relayed child line through raw `writeln!(std::io::stderr(), …)`, bypassing the anstream layer that strips ANSI when stderr isn't a terminal and honors `NO_COLOR`. The progress message arrives pre-rendered, which made it the only colored line in a redirected `wt switch` log. All three writes go through anstream's `eprintln!`. The static guard scans for macro names, so a write naming no macro was invisible to it; `check_raw_stderr_writes_go_through_anstream` refuses those shapes too, exempting only the tty-gated spinner that holds a lock across a frame. Also covers the delayed-stream buffer drain, which no test reached: the neighbouring cases either stream before the child writes or write after the switch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAUYWFN9d9oh6jyoQiouHb