fix: evaluate helm-binary BEFORE any helm invocation (#333)

closes #332
This commit is contained in:
David Genest 2018-09-12 20:59:35 -04:00 committed by KUOKA Yusuke
parent 30155d8742
commit b3da9a9a07
1 changed files with 3 additions and 4 deletions

View File

@ -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")