File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -181,15 +181,14 @@ func (f *ContainerFn) prepareImage() error {
181
181
return nil
182
182
}
183
183
184
- // check image existence
185
- foundImageInLocalCache := f .checkImageExistence ()
186
-
187
184
// If ImagePullPolicy is set to "ifNotPresent", we scan the local images
188
185
// first. If there is a match, we just return. This can be useful for local
189
186
// development to prevent the remote image to accidentally override the
190
187
// local image when they use the same name and tag.
191
- if f .ImagePullPolicy == IfNotPresentPull && foundImageInLocalCache {
192
- return nil
188
+ if f .ImagePullPolicy == IfNotPresentPull {
189
+ if foundInLocalCache := f .checkImageExistence (); foundInLocalCache {
190
+ return nil
191
+ }
193
192
}
194
193
195
194
// If ImagePullPolicy is set to always (which is the default), we will try
You can’t perform that action at this time.
0 commit comments