diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-06 09:55:40 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-20 13:55:19 -0500 |
commit | dc8996ec84ffd6f272361edbf7c19e91c52519d9 (patch) | |
tree | 77365b93b7f2652ff2a6314a1edc98c5f3f8913d /cmd | |
parent | 864fe21ed02ca6faa72e6a94f06c9961167aca7d (diff) | |
download | podman-dc8996ec84ffd6f272361edbf7c19e91c52519d9.tar.gz podman-dc8996ec84ffd6f272361edbf7c19e91c52519d9.tar.bz2 podman-dc8996ec84ffd6f272361edbf7c19e91c52519d9.zip |
Allow containers to --restart on-failure with --rm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/common/createparse.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/common/createparse.go b/cmd/podman/common/createparse.go index 09ee5aa0c..3a69f11b6 100644 --- a/cmd/podman/common/createparse.go +++ b/cmd/podman/common/createparse.go @@ -9,7 +9,7 @@ import ( // by validate must not need any state information on the flag (i.e. changed) func (c *ContainerCLIOpts) validate() error { var () - if c.Rm && c.Restart != "" && c.Restart != "no" { + if c.Rm && (c.Restart != "" && c.Restart != "no" && c.Restart != "on-failure") { return errors.Errorf(`the --rm option conflicts with --restart, when the restartPolicy is not "" and "no"`) } |