From f72a52c4b964cb063d8b4a68beadc11e415ff16e Mon Sep 17 00:00:00 2001 From: moririnson Date: Sat, 11 Nov 2023 10:14:24 +0900 Subject: [PATCH] fix: u.HelmBinary empty check for kustomize build Signed-off-by: moririnson --- kustomize.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kustomize.go b/kustomize.go index d6747e2..3a35e35 100644 --- a/kustomize.go +++ b/kustomize.go @@ -154,7 +154,11 @@ func (r *Runner) KustomizeBuild(srcDir string, tempDir string, opts ...Kustomize if err != nil { return "", err } - kustomizeArgs = append(kustomizeArgs, f, "--enable-helm", "--helm-command="+u.HelmBinary) + kustomizeArgs = append(kustomizeArgs, f) + + if u.HelmBinary != "" { + kustomizeArgs = append(kustomizeArgs, "--enable-helm", "--helm-command="+u.HelmBinary) + } out, err := r.runInDir(tempDir, r.kustomizeBin(), append(kustomizeArgs, tempDir)...) if err != nil {