Unverified Commit e91e9615 authored by Matt Farina's avatar Matt Farina Committed by GitHub

Merge pull request #4809 from mortent/FixOutputWhitespace

fix(helm): Use line breaks consistently in status output
parents a276bd81 586dc1db
...@@ -212,8 +212,13 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { ...@@ -212,8 +212,13 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
// track of tab widths. // track of tab widths.
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
p, _ := get.NewHumanPrintFlags().ToPrinter("") p, _ := get.NewHumanPrintFlags().ToPrinter("")
index := 0
for t, ot := range objs { for t, ot := range objs {
if _, err = buf.WriteString("==> " + t + "\n"); err != nil { kindHeader := fmt.Sprintf("==> %s", t)
if index == 0 {
kindHeader = kindHeader + "\n"
}
if _, err = buf.WriteString(kindHeader); err != nil {
return "", err return "", err
} }
for _, o := range ot { for _, o := range ot {
...@@ -225,6 +230,7 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { ...@@ -225,6 +230,7 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
if _, err := buf.WriteString("\n"); err != nil { if _, err := buf.WriteString("\n"); err != nil {
return "", err return "", err
} }
index += 1
} }
if len(missing) > 0 { if len(missing) > 0 {
buf.WriteString(MissingGetHeader) buf.WriteString(MissingGetHeader)
......
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