diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 79ff91f97..1a136cb2f 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -59,6 +59,10 @@ type ResultEntry struct { Description string `json:"description"` } +type Results struct { + SearchResults []ResultEntry `json:"searchResults"` +} + func newSearchCmd(out io.Writer) *cobra.Command { sc := &searchCmd{out: out} @@ -171,7 +175,7 @@ func (s *searchCmd) formatSearchResultsJson(res []*search.Result, colWidth uint) } resultJson = append(resultJson, resultRow) } - json, err := json.MarshalIndent(resultJson, "", " ") + json, err := json.MarshalIndent(Results{SearchResults: resultJson}, "", " ") if err != nil { return "", err }