kuebctl cp: discard output from test command

we only care about the exit code

see https://github.com/kubernetes/kubernetes/issues/126669
This commit is contained in:
Benjamin Elder 2024-08-14 16:58:02 -07:00 committed by Arda Güçlü
parent d981b19ad3
commit 78ae67a900

View File

@ -18,7 +18,6 @@ package cp
import (
"archive/tar"
"bytes"
"context"
"errors"
"fmt"
@ -269,8 +268,8 @@ func (o *CopyOptions) checkDestinationIsDir(dest fileSpec) error {
options := &exec.ExecOptions{
StreamOptions: exec.StreamOptions{
IOStreams: genericiooptions.IOStreams{
Out: bytes.NewBuffer([]byte{}),
ErrOut: bytes.NewBuffer([]byte{}),
Out: io.Discard,
ErrOut: io.Discard,
},
Namespace: dest.PodNamespace,