diff --git a/magefile.go b/magefile.go index 21c8e33734..e24790a5ca 100644 --- a/magefile.go +++ b/magefile.go @@ -3400,12 +3400,7 @@ func (Helm) RenderExamples() error { settings := cli.New() // Helm CLI settings actionConfig := &action.Configuration{} - helmChart, err := loader.Load(helmChartPath) - if err != nil { - return fmt.Errorf("failed to load helm chart: %w", err) - } - - err = actionConfig.Init(settings.RESTClientGetter(), "default", "", + err := actionConfig.Init(settings.RESTClientGetter(), "default", "", func(format string, v ...interface{}) {}) if err != nil { return fmt.Errorf("failed to init helm action config: %w", err) @@ -3422,6 +3417,11 @@ func (Helm) RenderExamples() error { continue } + helmChart, err := loader.Load(helmChartPath) + if err != nil { + return fmt.Errorf("failed to load helm chart: %w", err) + } + exampleFullPath := filepath.Join(examplesPath, d.Name()) helmValues := make(map[string]any)