Skip to content

Commit 78ae67a

Browse files
BenTheElderardaguclu
authored andcommitted
kuebctl cp: discard output from test command
we only care about the exit code see kubernetes#126669
1 parent d981b19 commit 78ae67a

File tree

1 file changed

+2
-3
lines changed
  • staging/src/k8s.io/kubectl/pkg/cmd/cp

1 file changed

+2
-3
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/cp/cp.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package cp
1818

1919
import (
2020
"archive/tar"
21-
"bytes"
2221
"context"
2322
"errors"
2423
"fmt"
@@ -269,8 +268,8 @@ func (o *CopyOptions) checkDestinationIsDir(dest fileSpec) error {
269268
options := &exec.ExecOptions{
270269
StreamOptions: exec.StreamOptions{
271270
IOStreams: genericiooptions.IOStreams{
272-
Out: bytes.NewBuffer([]byte{}),
273-
ErrOut: bytes.NewBuffer([]byte{}),
271+
Out: io.Discard,
272+
ErrOut: io.Discard,
274273
},
275274

276275
Namespace: dest.PodNamespace,

0 commit comments

Comments
 (0)