From 7efcae4d06f93be494b45f5b45c399e528097a27 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Thu, 26 Feb 2026 21:52:21 +1300 Subject: [PATCH] fix: resolve variable shadowing causing allServices count to always be 0 in swarm mode (#736) --- cmd/backup/stop_restart.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/backup/stop_restart.go b/cmd/backup/stop_restart.go index d774a35..9ea4b38 100644 --- a/cmd/backup/stop_restart.go +++ b/cmd/backup/stop_restart.go @@ -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") }