Skip to content

Commit 51afbc6

Browse files
committed
kicbase: simplify the image loading logic
This change refactors beginDownloadKicBaseImage() a bit to a more streamlined flow of logic, combining redundant blocks. Signed-off-by: Michael Adam <[email protected]>
1 parent 6d351f1 commit 51afbc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/minikube/node/cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
165165
if err == nil {
166166
klog.Infof("successfully saved %s as a tarball", img)
167167
}
168-
if downloadOnly && err == nil {
168+
if downloadOnly {
169169
return nil
170170
}
171171

172172
if cc.Driver == driver.Podman {
173173
return fmt.Errorf("not yet implemented, see issue #8426")
174174
}
175-
if driver.IsDocker(cc.Driver) && err == nil {
175+
if driver.IsDocker(cc.Driver) {
176176
klog.Infof("Loading %s from local cache", img)
177177
if finalImg, err = download.CacheToDaemon(img); err == nil {
178178
klog.Infof("successfully loaded and using %s from cached tarball", img)

0 commit comments

Comments
 (0)