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
|
pullPolicy := imagebuildah.PullIfNewer
|
||||||
if flags.Pull {
|
if c.Flags().Changed("pull") && !flags.Pull {
|
||||||
pullPolicy = imagebuildah.PullIfMissing
|
pullPolicy = imagebuildah.PullIfMissing
|
||||||
}
|
}
|
||||||
if flags.PullAlways {
|
if flags.PullAlways {
|
||||||
pullPolicy = imagebuildah.PullAlways
|
pullPolicy = imagebuildah.PullAlways
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if flags.PullNever {
|
||||||
|
pullPolicy = imagebuildah.PullNever
|
||||||
|
}
|
||||||
|
|
||||||
args := make(map[string]string)
|
args := make(map[string]string)
|
||||||
if c.Flag("build-arg").Changed {
|
if c.Flag("build-arg").Changed {
|
||||||
for _, arg := range flags.BuildArg {
|
for _, arg := range flags.BuildArg {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue