From 7b40cefdda6c1a240efbed66973f8adb089e9568 Mon Sep 17 00:00:00 2001 From: Tsubasa Nagasawa Date: Sun, 18 Sep 2022 17:22:46 +0900 Subject: [PATCH] fix: add missing untar flag to pull chart from oci registry Signed-off-by: Tsubasa Nagasawa --- pkg/helmexec/exec.go | 2 +- pkg/helmexec/exec_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/helmexec/exec.go b/pkg/helmexec/exec.go index e53e92a2..6ac2aba3 100644 --- a/pkg/helmexec/exec.go +++ b/pkg/helmexec/exec.go @@ -466,7 +466,7 @@ func (helm *execer) ChartPull(chart string, path string, flags ...string) error // in the 3.7.0 version, the chart pull has been replaced with helm pull // https://github.com/helm/helm/releases/tag/v3.7.0 ociChartURL, ociChartTag := resolveOciChart(chart) - helmArgs = []string{"pull", ociChartURL, "--version", ociChartTag, "--destination", path} + helmArgs = []string{"pull", ociChartURL, "--version", ociChartTag, "--destination", path, "--untar"} } else { helmArgs = []string{"chart", "pull", chart} } diff --git a/pkg/helmexec/exec_test.go b/pkg/helmexec/exec_test.go index 5dfa43e7..2b56f011 100644 --- a/pkg/helmexec/exec_test.go +++ b/pkg/helmexec/exec_test.go @@ -733,7 +733,7 @@ exec: helm --kube-context dev chart pull chart --untar --untardir /tmp/dir chartPath: "path1", chartFlags: []string{"--untardir", "/tmp/dir"}, listResult: `Pulling repo/helm-charts:0.14.0 -exec: helm --kube-context dev pull oci://repo/helm-charts --version 0.14.0 --destination path1 --untardir /tmp/dir +exec: helm --kube-context dev pull oci://repo/helm-charts --version 0.14.0 --destination path1 --untar --untardir /tmp/dir `, }, }