aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/images/build.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-27 08:38:52 -0500
committerGitHub <noreply@github.com>2022-01-27 08:38:52 -0500
commit5b01dab618fc287df4e6c41fa88c4a64d31fa3f3 (patch)
treec5e6e8e228eae64637b6107246b2bd53d746cd73 /cmd/podman/images/build.go
parent5659b0734c628f3f42fd976b6ce91372be3019ae (diff)
parent4a4d86d40f9137144103147e7a0ba74fbf3aaca8 (diff)
downloadpodman-5b01dab618fc287df4e6c41fa88c4a64d31fa3f3.tar.gz
podman-5b01dab618fc287df4e6c41fa88c4a64d31fa3f3.tar.bz2
podman-5b01dab618fc287df4e6c41fa88c4a64d31fa3f3.zip
Merge pull request #13029 from TomSweeneyRedHat/dev/tsweeney/mergepull2
Bump Buildah to v1.24.0
Diffstat (limited to 'cmd/podman/images/build.go')
-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
}