From 1bade27534209f2fd2d7a0b6437efb4965b648c8 Mon Sep 17 00:00:00 2001 From: Markus Wolf Date: Thu, 6 Oct 2022 00:13:00 +0200 Subject: [PATCH] fix: handle go closure iteration (#1374) Copy the matrix to make it closure aware --- pkg/runner/runner.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index e5646c2..af30305 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -121,6 +121,7 @@ func New(runnerConfig *Config) (Runner, error) { } // NewPlanExecutor ... +// //nolint:gocyclo func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor { maxJobNameLen := 0 @@ -156,6 +157,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor { } for i, matrix := range matrixes { + matrix := matrix rc := runner.newRunContext(ctx, run, matrix) rc.JobName = rc.Name if len(matrixes) > 1 {