mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
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 ```
This commit is contained in:
commit
46dfb3abc7
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user