diff options
author | Brent Baude <bbaude@redhat.com> | 2021-08-12 12:55:07 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-08-12 12:57:15 -0500 |
commit | bef26f2582733c23957a863bc0769a618ab773a8 (patch) | |
tree | 8c912ac25388be644b04082d09ac73f75768c67e /cmd/podman | |
parent | 94886d4abad7787cb920614ed26955ca36b13846 (diff) | |
download | podman-bef26f2582733c23957a863bc0769a618ab773a8.tar.gz podman-bef26f2582733c23957a863bc0769a618ab773a8.tar.bz2 podman-bef26f2582733c23957a863bc0769a618ab773a8.zip |
rename oneshot initcontainers to once
after the init containers pr merged, it was suggested to use `once`
instead of `oneshot` containers as it is more aligned with other
terminiology used similarily.
[NO TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/containers/create.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go index 906ae4452..a57488af2 100644 --- a/cmd/podman/containers/create.go +++ b/cmd/podman/containers/create.go @@ -13,6 +13,7 @@ import ( "github.com/containers/podman/v3/cmd/podman/common" "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/cmd/podman/utils" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/domain/entities" "github.com/containers/podman/v3/pkg/specgen" "github.com/containers/podman/v3/pkg/util" @@ -105,8 +106,8 @@ func create(cmd *cobra.Command, args []string) error { if !cmd.Flags().Changed("pod") { return errors.New("must specify pod value with init-ctr") } - if !util.StringInSlice(initctr, []string{"always", "oneshot"}) { - return errors.New("init-ctr value must be 'always' or 'oneshot'") + if !util.StringInSlice(initctr, []string{define.AlwaysInitContainer, define.OneShotInitContainer}) { + return errors.Errorf("init-ctr value must be '%s' or '%s'", define.AlwaysInitContainer, define.OneShotInitContainer) } cliVals.InitContainerType = initctr } |