From aae97a561757e1f2c74b6d53f86ed44ae596fc4e Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Sun, 29 Aug 2021 18:51:05 +0200 Subject: [PATCH] try restarting even when stopping some containers failed --- cmd/backup/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/backup/main.go b/cmd/backup/main.go index 0d515a9..d475337 100644 --- a/cmd/backup/main.go +++ b/cmd/backup/main.go @@ -186,8 +186,9 @@ func (s *script) stopContainers() (func() error, error) { } } + var stopError error if len(stopErrors) != 0 { - return noop, fmt.Errorf( + stopError = fmt.Errorf( "stopContainersAndRun: %d error(s) stopping containers: %w", len(stopErrors), err, @@ -244,7 +245,7 @@ func (s *script) stopContainers() (func() error, error) { len(stoppedContainers), ) return nil - }, nil + }, stopError } // takeBackup creates a tar archive of the configured backup location and