Skip to content

Commit 7efcae4

Browse files
fix: resolve variable shadowing causing allServices count to always be 0 in swarm mode (#736)
1 parent e2f8168 commit 7efcae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/backup/stop_restart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (s *script) stopContainersAndServices() (func() error, error) {
148148
var servicesToScaleDown []handledSwarmService
149149
if isDockerSwarm {
150150
result, err := s.cli.ServiceList(context.Background(), client.ServiceListOptions{Status: true})
151-
allServices := result.Items
151+
allServices = result.Items
152152
if err != nil {
153153
return noop, errwrap.Wrap(err, "error querying for services")
154154
}

0 commit comments

Comments
 (0)