Commit 7c6153f4 authored by Matt Butcher's avatar Matt Butcher Committed by GitHub

Merge pull request #1788 from nebril/helm-status-align

Align output of helm status resources output
parents 35604f23 075a9d8e
......@@ -19,6 +19,8 @@ package main
import (
"fmt"
"io"
"regexp"
"text/tabwriter"
"github.com/spf13/cobra"
......@@ -95,7 +97,11 @@ func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) {
}
fmt.Fprintf(out, "\n")
if len(res.Info.Status.Resources) > 0 {
fmt.Fprintf(out, "RESOURCES:\n%s\n", res.Info.Status.Resources)
re := regexp.MustCompile(" +")
w := tabwriter.NewWriter(out, 0, 0, 2, ' ', tabwriter.TabIndent)
fmt.Fprintf(w, "RESOURCES:\n%s\n", re.ReplaceAllString(res.Info.Status.Resources, "\t"))
w.Flush()
}
if len(res.Info.Status.Notes) > 0 {
fmt.Fprintf(out, "NOTES:\n%s\n", res.Info.Status.Notes)
......
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