mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-09-25 16:04:40 +08:00
make sure backup also runs when socket isn't present
This commit is contained in:
parent
07b06cf0ba
commit
5a2bf48ec6
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue