fix: resolve variable shadowing causing allServices count to always be 0 in swarm mode (#736)

This commit is contained in:
Richard Chapman
2026-02-26 21:52:21 +13:00
committed by GitHub
parent e2f8168d7d
commit 7efcae4d06

View File

@@ -148,7 +148,7 @@ func (s *script) stopContainersAndServices() (func() error, error) {
var servicesToScaleDown []handledSwarmService
if isDockerSwarm {
result, err := s.cli.ServiceList(context.Background(), client.ServiceListOptions{Status: true})
allServices := result.Items
allServices = result.Items
if err != nil {
return noop, errwrap.Wrap(err, "error querying for services")
}