You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): make stderr redirect portable + survive log rotation
Code review feedback on the inline redirectStderr from 13967d0:
- Critical: syscall.Dup/syscall.Dup2 don't exist on linux/arm64
(kernel only exposes dup3) and windows. Splits the redirect into
redirect_stderr_unix.go (uses golang.org/x/sys/unix.Dup/Dup2,
which abstracts to dup3 on linux/arm64) and redirect_stderr_other.go
(no-op stub). Verified clean builds for darwin, linux/arm64, windows/amd64.
- Important: write captured stderr to "<cfg.LogFile>.stderr" instead
of the rotated log itself, so lumberjack can't rename/gzip the file
out from under our cached fd 2 mid-session.
- Minor: move redirectStderr() call before tui.NewModel so a bad log
path fails fast before the production loader spawns goroutines.
- Minor: re-attach the orphaned docstring on handleSpinnerTickMsg
(separated by a blank line, godoc didn't pick it up).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments