modify the output when the output-dir is specified

Avoid output in IO when output-dir is specified.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
pull/9026/head
Zhou Hao 5 years ago
parent c4f6e77cff
commit 30cf4d6e6b

@ -148,7 +148,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
for _, m := range manifestsToRender { for _, m := range manifestsToRender {
fmt.Fprintf(out, "---\n%s\n", m) fmt.Fprintf(out, "---\n%s\n", m)
} }
} else { } else if client.OutputDir == "" {
fmt.Fprintf(out, "%s", manifests.String()) fmt.Fprintf(out, "%s", manifests.String())
} }
} }

Loading…
Cancel
Save