mirror of https://github.com/containers/podman.git
Merge pull request #8189 from mheon/further_fix_pull_flag
Fix the `--pull` flag to `podman build` to match Docker
This commit is contained in:
commit
1ce5ece66f
|
@ -241,8 +241,12 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
|
||||||
}
|
}
|
||||||
|
|
||||||
pullPolicy := imagebuildah.PullIfNewer
|
pullPolicy := imagebuildah.PullIfNewer
|
||||||
if c.Flags().Changed("pull") && !flags.Pull {
|
if c.Flags().Changed("pull") {
|
||||||
pullPolicy = imagebuildah.PullIfMissing
|
if flags.Pull {
|
||||||
|
pullPolicy = imagebuildah.PullAlways
|
||||||
|
} else {
|
||||||
|
pullPolicy = imagebuildah.PullNever
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if flags.PullAlways {
|
if flags.PullAlways {
|
||||||
pullPolicy = imagebuildah.PullAlways
|
pullPolicy = imagebuildah.PullAlways
|
||||||
|
|
Loading…
Reference in New Issue