mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-04 01:30:39 +00:00
util to check if volume exists
This commit is contained in:
@@ -77,3 +77,9 @@ func CopyFile(from, to string) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func CheckIfVolumeExists(volume string) bool {
|
||||||
|
out, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume)
|
||||||
|
fmt.Println(out)
|
||||||
|
return err == nil
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user