Skip to content

Commit f78f6af

Browse files
Merge pull request #11601 from spowelljr/fixLog
Prevent misleading "save to tar file succeeded" message from being logged
2 parents 471207b + b4cc318 commit f78f6af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/minikube/image/cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ func SaveToDir(images []string, cacheDir string, overwrite bool) error {
7373
dst = localpath.SanitizeCacheDir(dst)
7474
if err := saveToTarFile(image, dst, overwrite); err != nil {
7575
if err == errCacheImageDoesntExist {
76-
out.WarningT("The image you are trying to add {{.imageName}} doesn't exist!", out.V{"imageName": image})
77-
} else {
78-
return errors.Wrapf(err, "caching image %q", dst)
76+
out.WarningT("The image '{{.imageName}}' was not found; unable to add it to cache.", out.V{"imageName": image})
77+
return nil
7978
}
79+
return errors.Wrapf(err, "caching image %q", dst)
8080
}
8181
klog.Infof("save to tar file %s -> %s succeeded", image, dst)
8282
return nil

0 commit comments

Comments
 (0)