mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
util to check if volume exists
This commit is contained in:
parent
2c46f0da0c
commit
6817f494ef
@ -77,3 +77,9 @@ func CopyFile(from, to string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func CheckIfVolumeExists(volume string) bool {
|
||||
out, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume)
|
||||
fmt.Println(out)
|
||||
return err == nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user