make sure backup also runs when socket isn't present

This commit is contained in:
Frederik Ring 2021-08-22 22:44:36 +02:00
parent edefe69e6f
commit 8c46bd54aa

View File

@ -153,8 +153,9 @@ func (s *script) init() error {
// sure containers are being restarted if required.
func (s *script) stopContainersAndRun(thunk func() error) error {
if s.cli == nil {
return nil
return thunk()
}
allContainers, err := s.cli.ContainerList(s.ctx, types.ContainerListOptions{
Quiet: true,
})