diff --git a/cmd/deps/app.go b/cmd/deps/app.go index 1a7a092..6955b85 100644 --- a/cmd/deps/app.go +++ b/cmd/deps/app.go @@ -11,6 +11,7 @@ func BuildGroups(groupUpdates chan *group.Group, conf *internal.ConditionalReboo var groups []*group.Group for _, groupConf := range conf.Groups { + groupConf := groupConf group, err := BuildGroup(groupUpdates, &groupConf) if err != nil { return nil, fmt.Errorf("could not build group '%s': %w", groupConf.Name, err) diff --git a/cmd/deps/group.go b/cmd/deps/group.go index 980b2c0..07420a3 100644 --- a/cmd/deps/group.go +++ b/cmd/deps/group.go @@ -31,6 +31,7 @@ func BuildGroup(groupUpdates chan *group.Group, conf *internal.GroupConf) (*grou func BuildAgents(conf *internal.GroupConf) ([]state.Agent, error) { var agents []state.Agent for _, agentConf := range conf.Agents { + agentConf := agentConf agent, err := BuildAgent(&agentConf) if err != nil { return nil, err