From b015f10d6672b3e444d76d79a19fd68d6e4bedd3 Mon Sep 17 00:00:00 2001 From: noracenofun <62801810+noracenofun@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:19:03 +0100 Subject: [PATCH] correction output of podman pod create --help default infra-image in the message of podman pod create --help corrected [NO NEW TESTS NEEDED] Signed-off-by: noracenofun <62801810+noracenofun@users.noreply.github.com> --- cmd/podman/pods/create.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go index 5d8a5aeab6..862a8fb038 100644 --- a/cmd/podman/pods/create.go +++ b/cmd/podman/pods/create.go @@ -11,6 +11,7 @@ import ( "strings" "github.com/containers/common/pkg/completion" + "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/sysinfo" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/containers" @@ -71,11 +72,13 @@ func init() { _ = createCommand.RegisterFlagCompletionFunc(nameFlagName, completion.AutocompleteNone) infraImageFlagName := "infra-image" - var defInfraImage string + defInfraImage := "" if !registry.IsRemote() { - defInfraImage = containerConfig.Engine.InfraImage + if containerConfig.Engine.InfraImage != config.DefaultInfraImage { + defInfraImage = containerConfig.Engine.InfraImage + } } - flags.StringVar(&infraImage, infraImageFlagName, defInfraImage, "The image of the infra container to associate with the pod") + flags.StringVar(&infraImage, infraImageFlagName, defInfraImage, "Image to use for infra container, rather than builtin") _ = createCommand.RegisterFlagCompletionFunc(infraImageFlagName, common.AutocompleteImages) podIDFileFlagName := "pod-id-file"