Merge pull request #50573 from shiywang/setfix

Automatic merge from submit-queue (batch tested with PRs 50302, 50573, 50500, 50633, 50617)

fix apply_set_last_applied dry-run output issue

Fixes https://github.com/kubernetes/kubernetes/issues/50572

@kubernetes/sig-cli-bugs 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-08-14 20:42:18 -07:00 committed by GitHub
commit de8dacd620

View File

@ -222,9 +222,9 @@ func (o *SetLastAppliedOptions) formatPrinter(output string, buf []byte, w io.Wr
if err != nil { if err != nil {
return err return err
} }
fmt.Fprintf(w, string(jsonBuffer.Bytes())) fmt.Fprintf(w, "%s\n", jsonBuffer.String())
case "yaml": case "yaml":
fmt.Fprintf(w, string(yamlOutput)) fmt.Fprintf(w, "%s\n", string(yamlOutput))
} }
return nil return nil
} }