From 2a6bd24e3c11432281e66716fe7fc8d1d3bcef3b Mon Sep 17 00:00:00 2001 From: Shane Starcher Date: Fri, 30 Aug 2019 22:32:48 -0700 Subject: [PATCH] move context outside to limit duplicate repo updates (#828) --- pkg/app/app.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/app/app.go b/pkg/app/app.go index 7c725c43..663e403c 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -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)