From 219cebecf769c806e351a8c351ba21123124526b Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 26 May 2017 13:32:45 +0000 Subject: [PATCH] Don't print "running in local/dry-run mode..." at the top because the user may be trying to pipe the output of this command as the input to another. This makes `set subject` and `set resources` consistent with all similar commands in this directory. Signed-off-by: Bryan Boreham --- pkg/kubectl/cmd/set/set_selector.go | 1 - pkg/kubectl/cmd/set/set_subject.go | 1 - 2 files changed, 2 deletions(-) diff --git a/pkg/kubectl/cmd/set/set_selector.go b/pkg/kubectl/cmd/set/set_selector.go index e8f395d0545..4f7c2b5acff 100644 --- a/pkg/kubectl/cmd/set/set_selector.go +++ b/pkg/kubectl/cmd/set/set_selector.go @@ -172,7 +172,6 @@ func (o *SelectorOptions) RunSelector() error { return patch.Err } if o.local || o.dryrun { - fmt.Fprintln(o.out, "running in local/dry-run mode...") o.PrintObject(info.Object) return nil } diff --git a/pkg/kubectl/cmd/set/set_subject.go b/pkg/kubectl/cmd/set/set_subject.go index 0cd1d16ac19..2ab3fc11c27 100644 --- a/pkg/kubectl/cmd/set/set_subject.go +++ b/pkg/kubectl/cmd/set/set_subject.go @@ -224,7 +224,6 @@ func (o *SubjectOptions) Run(f cmdutil.Factory, fn updateSubjects) error { } if o.Local || o.DryRun { - fmt.Fprintln(o.Out, "running in local/dry-run mode...") return o.PrintObject(o.Mapper, info.Object, o.Out) }