diff options
author | tomsweeneyredhat <tsweeney@redhat.com> | 2022-01-26 20:39:58 -0500 |
---|---|---|
committer | tomsweeneyredhat <tsweeney@redhat.com> | 2022-01-27 07:03:56 -0500 |
commit | 4a4d86d40f9137144103147e7a0ba74fbf3aaca8 (patch) | |
tree | 3ac1755da170942000631457d343f9ae2c34ef21 /cmd | |
parent | 09589fccfdd27478defc3e3e3827265d50fa9e33 (diff) | |
download | podman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.tar.gz podman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.tar.bz2 podman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.zip |
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 <tsweeney@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/images/build.go | 9 |
1 files changed, 6 insertions, 3 deletions
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 } |