Fix podman build "newer" pull policy

It's currently ignored.

Fixes: #22845

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
This commit is contained in:
Zifei Tong
2025-09-05 18:50:01 -07:00
parent c8183c50a0
commit a19307f502

View File

@@ -324,6 +324,10 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil
pullPolicy = buildahDefine.PullNever
}
if strings.EqualFold(strings.TrimSpace(flags.Pull), "newer") {
pullPolicy = buildahDefine.PullIfNewer
}
var cleanTmpFile bool
flags.Authfile, cleanTmpFile = buildahUtil.MirrorToTempFileIfPathIsDescriptor(flags.Authfile)
if cleanTmpFile {