mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-25 01:35:36 +02:00
fix: resolve variable shadowing causing allServices count to always be 0 in swarm mode (#736)
This commit is contained in:
@@ -148,7 +148,7 @@ func (s *script) stopContainersAndServices() (func() error, error) {
|
|||||||
var servicesToScaleDown []handledSwarmService
|
var servicesToScaleDown []handledSwarmService
|
||||||
if isDockerSwarm {
|
if isDockerSwarm {
|
||||||
result, err := s.cli.ServiceList(context.Background(), client.ServiceListOptions{Status: true})
|
result, err := s.cli.ServiceList(context.Background(), client.ServiceListOptions{Status: true})
|
||||||
allServices := result.Items
|
allServices = result.Items
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return noop, errwrap.Wrap(err, "error querying for services")
|
return noop, errwrap.Wrap(err, "error querying for services")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user