aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authortomsweeneyredhat <tsweeney@redhat.com>2022-01-26 20:39:58 -0500
committertomsweeneyredhat <tsweeney@redhat.com>2022-01-27 07:03:56 -0500
commit4a4d86d40f9137144103147e7a0ba74fbf3aaca8 (patch)
tree3ac1755da170942000631457d343f9ae2c34ef21 /cmd/podman
parent09589fccfdd27478defc3e3e3827265d50fa9e33 (diff)
downloadpodman-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/podman')
-rw-r--r--cmd/podman/images/build.go9
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
}