diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go b/staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go index 0164041a846..4254405e332 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go @@ -300,10 +300,7 @@ func (o *ClusterInfoDumpOptions) Run() error { } dest := o.OutputDir - if len(dest) == 0 { - dest = "standard output" - } - if dest != "-" { + if len(dest) > 0 && dest != "-" { fmt.Fprintf(o.Out, "Cluster info dumped to %s\n", dest) } return nil