mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 03:42:01 -04:00
On non-PTY exec sessions stdout was wrapped in the recording writer but stderr was copied to the client raw, so any command output written to stderr never appeared in the session recording. PTY sessions were unaffected because they fold stdout and stderr into a single stream that already flows through the recording writer. Wrap stderr in rec.writer too, recording it under the "o" (output) direction, matching how PTY sessions record combined output. The asciinema cast format has no separate stderr channel, so "o" is the correct code for players and tsrecorder to render it. Strengthen TestSSHRecordingNonInteractive to run a command that writes to both stdout and stderr and assert both appear in the recorded cast lines. Updates tailscale/corp#48187 Change-Id: I1dc36073722677a85f2b23b331fd55b8df4d342e Reported-by: Ben Carman <benthecarman@live.com> Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>