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 07b06cf0ba
commit 5a2bf48ec6

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,
})