Skip to content

Commit a19307f

Browse files
committed
Fix podman build "newer" pull policy
It's currently ignored. Fixes: #22845 Signed-off-by: Zifei Tong <[email protected]>
1 parent c8183c5 commit a19307f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/podman/common/build.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil
324324
pullPolicy = buildahDefine.PullNever
325325
}
326326

327+
if strings.EqualFold(strings.TrimSpace(flags.Pull), "newer") {
328+
pullPolicy = buildahDefine.PullIfNewer
329+
}
330+
327331
var cleanTmpFile bool
328332
flags.Authfile, cleanTmpFile = buildahUtil.MirrorToTempFileIfPathIsDescriptor(flags.Authfile)
329333
if cleanTmpFile {

0 commit comments

Comments
 (0)