cli: Wrap Err stream

This wraps the cli stderr stream the same way as stdin and stdout, which
extends the stream with TTY-related methods.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2024-06-11 16:49:25 +02:00
parent 52eddcf4e4
commit 6b93cf221a
9 changed files with 25 additions and 24 deletions

View File

@ -136,7 +136,7 @@ func TestStdioAttributes(t *testing.T) {
cli := &DockerCli{
in: streams.NewIn(io.NopCloser(strings.NewReader(""))),
out: streams.NewOut(outBuffer),
err: errBuffer,
err: streams.NewOut(errBuffer),
}
cli.In().SetIsTerminal(tc.stdinTty)
cli.Out().SetIsTerminal(tc.stdoutTty)