mirror of https://github.com/containers/podman.git
Merge pull request #8085 from TomSweeneyRedHat/dev/tsweeney/fixpulls
Fix pull method selection
This commit is contained in:
commit
222d8075ab
|
|
@ -240,14 +240,18 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
|
|||
}
|
||||
}
|
||||
|
||||
pullPolicy := imagebuildah.PullNever
|
||||
if flags.Pull {
|
||||
pullPolicy := imagebuildah.PullIfNewer
|
||||
if c.Flags().Changed("pull") && !flags.Pull {
|
||||
pullPolicy = imagebuildah.PullIfMissing
|
||||
}
|
||||
if flags.PullAlways {
|
||||
pullPolicy = imagebuildah.PullAlways
|
||||
}
|
||||
|
||||
if flags.PullNever {
|
||||
pullPolicy = imagebuildah.PullNever
|
||||
}
|
||||
|
||||
args := make(map[string]string)
|
||||
if c.Flag("build-arg").Changed {
|
||||
for _, arg := range flags.BuildArg {
|
||||
|
|
|
|||
Loading…
Reference in New Issue