diff --git a/pkg/app/piped/platformprovider/kubernetes/loader.go b/pkg/app/piped/platformprovider/kubernetes/loader.go index 93518b8407..d8d9d041b3 100644 --- a/pkg/app/piped/platformprovider/kubernetes/loader.go +++ b/pkg/app/piped/platformprovider/kubernetes/loader.go @@ -16,6 +16,7 @@ package kubernetes import ( "context" + "errors" "fmt" "os" "path/filepath" @@ -90,13 +91,12 @@ func (l *loader) LoadManifests(ctx context.Context) (manifests []Manifest, err e sortManifests(manifests) }() l.initOnce.Do(func() { + var initErrorHelm, initErrorKustomize error l.templatingMethod = determineTemplatingMethod(l.input, l.appDir) - switch l.templatingMethod { - case TemplatingMethodHelm: - l.helm, l.initErr = l.findHelm(ctx, l.input.HelmVersion) - - case TemplatingMethodKustomize: - l.kustomize, l.initErr = l.findKustomize(ctx, l.input.KustomizeVersion) + if l.templatingMethod != TemplatingMethodNone { + l.helm, initErrorHelm = l.findHelm(ctx, l.input.HelmVersion) + l.kustomize, initErrorKustomize = l.findKustomize(ctx, l.input.KustomizeVersion) + l.initErr = errors.Join(initErrorHelm, initErrorKustomize) } }) if l.initErr != nil {