Merge pull request #11601 from spowelljr/fixLog

Prevent misleading "save to tar file succeeded" message from being logged
pull/11610/head
Sharif Elgamal 2021-06-08 13:12:41 -07:00 committed by GitHub
commit f78f6afe16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -73,10 +73,10 @@ func SaveToDir(images []string, cacheDir string, overwrite bool) error {
dst = localpath.SanitizeCacheDir(dst)
if err := saveToTarFile(image, dst, overwrite); err != nil {
if err == errCacheImageDoesntExist {
out.WarningT("The image you are trying to add {{.imageName}} doesn't exist!", out.V{"imageName": image})
} else {
return errors.Wrapf(err, "caching image %q", dst)
out.WarningT("The image '{{.imageName}}' was not found; unable to add it to cache.", out.V{"imageName": image})
return nil
}
return errors.Wrapf(err, "caching image %q", dst)
}
klog.Infof("save to tar file %s -> %s succeeded", image, dst)
return nil