diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-06-01 07:58:50 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-06-01 09:23:10 -0700 |
commit | 670f7c271f8f308b057b0e05da376b4e92d0e5e3 (patch) | |
tree | cd96f4e24d0b97c010d295e61c9ebb43e783e060 /pkg/specgen | |
parent | f559cec6c0d1694cca9530004aaba3c138f621e3 (diff) | |
download | podman-670f7c271f8f308b057b0e05da376b4e92d0e5e3.tar.gz podman-670f7c271f8f308b057b0e05da376b4e92d0e5e3.tar.bz2 podman-670f7c271f8f308b057b0e05da376b4e92d0e5e3.zip |
Add invalid value to error message
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/container_validate.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index 94e456c52..75da38c0e 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -50,7 +50,8 @@ func (s *SpecGenerator) Validate() error { } // 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) { - 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 if s.ContainerStorageConfig.ShmSize != nil && !s.ContainerStorageConfig.IpcNS.IsPrivate() { |