From 4a4d86d40f9137144103147e7a0ba74fbf3aaca8 Mon Sep 17 00:00:00 2001 From: tomsweeneyredhat Date: Wed, 26 Jan 2022 20:39:58 -0500 Subject: Bump Buildah to v1.24.0 Bumps Buildah to v1.24.0 and adopts the new values for pull: true, false, never, and always. The pull-never and pull-always options for the build command are still usable, but they have been removed from the man page documentation with this change. Signed-off-by: tomsweeneyredhat --- cmd/podman/images/build.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index cde050d5e..729951a31 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -354,15 +354,18 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil return nil, errors.Errorf("can only set one of 'pull' or 'pull-always' or 'pull-never'") } + // Allow for --pull, --pull=true, --pull=false, --pull=never, --pull=always + // --pull-always and --pull-never. The --pull-never and --pull-always options + // will not be documented. pullPolicy := buildahDefine.PullIfMissing - if c.Flags().Changed("pull") && flags.Pull { + if c.Flags().Changed("pull") && strings.EqualFold(strings.TrimSpace(flags.Pull), "true") { pullPolicy = buildahDefine.PullAlways } - if flags.PullAlways { + if flags.PullAlways || strings.EqualFold(strings.TrimSpace(flags.Pull), "always") { pullPolicy = buildahDefine.PullAlways } - if flags.PullNever { + if flags.PullNever || strings.EqualFold(strings.TrimSpace(flags.Pull), "never") { pullPolicy = buildahDefine.PullNever } -- cgit v1.2.3-54-g00ecf