mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #6453 from jwhonce/wip/errors
Add invalid value to error message
This commit is contained in:
@ -50,7 +50,8 @@ func (s *SpecGenerator) Validate() error {
|
|||||||
}
|
}
|
||||||
// imagevolumemode must be one of ignore, tmpfs, or anonymous if given
|
// imagevolumemode must be one of ignore, tmpfs, or anonymous if given
|
||||||
if len(s.ContainerStorageConfig.ImageVolumeMode) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerStorageConfig.ImageVolumeMode), ImageVolumeModeValues) {
|
if len(s.ContainerStorageConfig.ImageVolumeMode) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerStorageConfig.ImageVolumeMode), ImageVolumeModeValues) {
|
||||||
return errors.Errorf("ImageVolumeMode values must be one of %s", strings.Join(ImageVolumeModeValues, ","))
|
return errors.Errorf("invalid ImageVolumeMode %q, value must be one of %s",
|
||||||
|
s.ContainerStorageConfig.ImageVolumeMode, strings.Join(ImageVolumeModeValues, ","))
|
||||||
}
|
}
|
||||||
// shmsize conflicts with IPC namespace
|
// shmsize conflicts with IPC namespace
|
||||||
if s.ContainerStorageConfig.ShmSize != nil && !s.ContainerStorageConfig.IpcNS.IsPrivate() {
|
if s.ContainerStorageConfig.ShmSize != nil && !s.ContainerStorageConfig.IpcNS.IsPrivate() {
|
||||||
|
Reference in New Issue
Block a user