From c151147258e5e8b4c9f9fa3d23ab66702b9096b7 Mon Sep 17 00:00:00 2001 From: justinsb Date: Mon, 20 Mar 2023 13:19:55 +0000 Subject: [PATCH] Don't swallow helm execution errors These are otherwise hard to debug. --- api/internal/builtins/HelmChartInflationGenerator.go | 4 ++-- .../HelmChartInflationGenerator.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/internal/builtins/HelmChartInflationGenerator.go b/api/internal/builtins/HelmChartInflationGenerator.go index d646c72d52..25d7eba26a 100644 --- a/api/internal/builtins/HelmChartInflationGenerator.go +++ b/api/internal/builtins/HelmChartInflationGenerator.go @@ -155,8 +155,8 @@ func (p *HelmChartInflationGeneratorPlugin) runHelmCommand( helm := p.h.GeneralConfig().HelmConfig.Command err = errors.WrapPrefixf( fmt.Errorf( - "unable to run: '%s %s' with env=%s (is '%s' installed?)", - helm, strings.Join(args, " "), env, helm), + "unable to run: '%s %s' with env=%s (is '%s' installed?): %w", + helm, strings.Join(args, " "), env, helm, err), stderr.String(), ) } diff --git a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go index ac8e0aaaa5..2961deec63 100644 --- a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go +++ b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go @@ -161,8 +161,8 @@ func (p *plugin) runHelmCommand( helm := p.h.GeneralConfig().HelmConfig.Command err = errors.WrapPrefixf( fmt.Errorf( - "unable to run: '%s %s' with env=%s (is '%s' installed?)", - helm, strings.Join(args, " "), env, helm), + "unable to run: '%s %s' with env=%s (is '%s' installed?): %w", + helm, strings.Join(args, " "), env, helm, err), stderr.String(), ) }