Skip to content

Commit

Permalink
fix: handle go closure iteration (#1374)
Browse files Browse the repository at this point in the history
Copy the matrix to make it closure aware
  • Loading branch information
KnisterPeter committed Oct 5, 2022
1 parent 79384c3 commit 1bade27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func New(runnerConfig *Config) (Runner, error) {
}

// NewPlanExecutor ...
//
//nolint:gocyclo
func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
maxJobNameLen := 0
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1bade27

Please sign in to comment.