From b3da9a9a07f44655d34081f5410a851b1e8ddebe Mon Sep 17 00:00:00 2001 From: David Genest Date: Wed, 12 Sep 2018 20:59:35 -0400 Subject: [PATCH] fix: evaluate helm-binary BEFORE any helm invocation (#333) closes #332 --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 438aeb58..4bd07fe6 100644 --- a/main.go +++ b/main.go @@ -495,6 +495,9 @@ func executeSyncCommand(c *cli.Context, state *state.HelmState, helm helmexec.In } func executeTemplateCommand(c *cli.Context, state *state.HelmState, helm helmexec.Interface) []error { + if c.GlobalString("helm-binary") != "" { + helm.SetHelmBinary(c.GlobalString("helm-binary")) + } if errs := state.SyncRepos(helm); errs != nil && len(errs) > 0 { return errs } @@ -503,10 +506,6 @@ func executeTemplateCommand(c *cli.Context, state *state.HelmState, helm helmexe return errs } - if c.GlobalString("helm-binary") != "" { - helm.SetHelmBinary(c.GlobalString("helm-binary")) - } - args := args.GetArgs(c.String("args"), state) values := c.StringSlice("values") workers := c.Int("concurrency")