mirror of
https://github.com/containers/podman.git
synced 2025-10-18 11:42:55 +08:00
specgen: fix error message
the check is correct but the error message was stating the opposite. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -34,7 +34,7 @@ func (s *SpecGenerator) Validate() error {
|
||||
}
|
||||
// Cannot set hostname and utsns
|
||||
if len(s.ContainerBasicConfig.Hostname) > 0 && !s.ContainerBasicConfig.UtsNS.IsPrivate() {
|
||||
return errors.Wrap(ErrInvalidSpecConfig, "cannot set hostname when creating an UTS namespace")
|
||||
return errors.Wrap(ErrInvalidSpecConfig, "cannot set hostname when running in the host UTS namespace")
|
||||
}
|
||||
// systemd values must be true, false, or always
|
||||
if len(s.ContainerBasicConfig.Systemd) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerBasicConfig.Systemd), SystemDValues) {
|
||||
|
Reference in New Issue
Block a user