mirror of
https://github.com/containers/podman.git
synced 2025-09-21 19:55:08 +08:00
Merge pull request #16243 from alexlarsson/volume-create-ignore
Add podman volume create --ignore
This commit is contained in:
@ -70,6 +70,11 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
volumeOptions = append(volumeOptions, parsedOptions...)
|
||||
}
|
||||
|
||||
if input.IgnoreIfExists {
|
||||
volumeOptions = append(volumeOptions, libpod.WithVolumeIgnoreIfExist())
|
||||
}
|
||||
|
||||
vol, err := runtime.NewVolume(r.Context(), volumeOptions...)
|
||||
if err != nil {
|
||||
utils.InternalServerError(w, err)
|
||||
|
Reference in New Issue
Block a user