mirror of
https://github.com/kopia/kopia.git
synced 2026-02-01 18:23:36 -05:00
Give a `*bytes.Buffer` to the command and let `package exec` read from the pipe into the buffer for us. The current use of the `StderrPipe()` method was problematic; the documentation for os/exec states: > Wait will close the pipe after seeing the command exit, so most callers need not close the pipe themselves. It is thus incorrect to call Wait before all reads from the pipe have completed. For the same reason, it is incorrect to use Run when using StderrPipe.