move context outside to limit duplicate repo updates (#828)

This commit is contained in:
Shane Starcher 2019-08-30 22:32:48 -07:00 committed by KUOKA Yusuke
parent 11d0abba6e
commit 2a6bd24e3c
1 changed files with 1 additions and 2 deletions

View File

@ -381,9 +381,8 @@ func (a *App) visitStates(fileOrDir string, defOpts LoadOpts, converge func(*sta
}
func (a *App) ForEachState(do func(*Run) []error) error {
ctx := NewContext()
err := a.VisitDesiredStatesWithReleasesFiltered(a.FileOrDir, func(st *state.HelmState, helm helmexec.Interface) []error {
ctx := NewContext()
run := NewRun(st, helm, ctx)
return do(run)