mirror of
https://github.com/larksuite/cli.git
synced 2026-07-19 18:31:41 +08:00
archive.Stderr and extract.Stderr shared one strings.Builder; os/exec spawns a stderr-copy goroutine per command, so git archive and tar (which run concurrently) could write the builder simultaneously. strings.Builder is not concurrency-safe, so go test -race would flag it on any run where both processes emit stderr. Give each process its own buffer and report the relevant one on failure. Flagged by CodeRabbit on PR #1840.