Skip to content

Commit

Permalink
Merge pull request #628 from Praqma/fix_pull
Browse files Browse the repository at this point in the history
fix: unknown command "chart" for "helm"
  • Loading branch information
luisdavim authored Sep 21, 2021
2 parents 679adf3 + 7bcf3d8 commit 91efec4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/app/helm_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ func helmExportChart(chart, dest string) error {
// helmPullChart pulls chart and exports it to the specified destination
// this should only be used with helm versions greater or equal to 3.7.0
func helmPullChart(chart, dest string) error {
cmd := helmCmd([]string{"chart", "pull", chart, "-d", dest}, "Pulling chart [ "+chart+" ] to "+dest)
chartParts := strings.Split(chart, ":")
if len(chartParts) < 2 {
return fmt.Errorf("missing chart version")
}
version := chartParts[len(chartParts)-1]
chart = strings.Join(chartParts[:len(chartParts)-1], ":")
cmd := helmCmd([]string{"pull", chart, "-d", dest, "--version", version}, "Pulling chart [ "+chart+" ] to "+dest)
if _, err := cmd.Exec(); err != nil {
return err
}
Expand Down

0 comments on commit 91efec4

Please sign in to comment.