Commit 46dfb3ab authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46507 from bboreham/dont-print-local-message

Automatic merge from submit-queue Don't print message at the top of `set selector` or `set subject` **What this PR does / why we need it**: Stop printing "running in local/dry-run mode..." at the top of `set selector` or `set subject`, because the user may be trying to pipe the output of this command as the input to another. **Which issue this PR fixes**: fixes #46505 **Special notes for your reviewer**: This PR makes `set subject` and `set resources` consistent with similar commands in the same directory. **Release note**: ```release-note `set selector` and `set subject` no longer print "running in local/dry-run mode..." at the top, so their output can be piped as valid yaml or json ```
parents d10c9975 219cebec
...@@ -172,7 +172,6 @@ func (o *SelectorOptions) RunSelector() error { ...@@ -172,7 +172,6 @@ func (o *SelectorOptions) RunSelector() error {
return patch.Err return patch.Err
} }
if o.local || o.dryrun { if o.local || o.dryrun {
fmt.Fprintln(o.out, "running in local/dry-run mode...")
o.PrintObject(info.Object) o.PrintObject(info.Object)
return nil return nil
} }
......
...@@ -224,7 +224,6 @@ func (o *SubjectOptions) Run(f cmdutil.Factory, fn updateSubjects) error { ...@@ -224,7 +224,6 @@ func (o *SubjectOptions) Run(f cmdutil.Factory, fn updateSubjects) error {
} }
if o.Local || o.DryRun { if o.Local || o.DryRun {
fmt.Fprintln(o.Out, "running in local/dry-run mode...")
return o.PrintObject(o.Mapper, info.Object, o.Out) return o.PrintObject(o.Mapper, info.Object, o.Out)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment