diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-27 08:38:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 08:38:52 -0500 |
commit | 5b01dab618fc287df4e6c41fa88c4a64d31fa3f3 (patch) | |
tree | c5e6e8e228eae64637b6107246b2bd53d746cd73 /cmd/podman/images/build.go | |
parent | 5659b0734c628f3f42fd976b6ce91372be3019ae (diff) | |
parent | 4a4d86d40f9137144103147e7a0ba74fbf3aaca8 (diff) | |
download | podman-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.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 } |