check for err

pull/7003/head
Medya Gh 2020-03-10 22:45:53 -07:00
parent fb9cd3cbf5
commit 94dfb49ae9
1 changed files with 6 additions and 2 deletions

View File

@ -42,8 +42,12 @@ func beginCacheKubernetesImages(g *errgroup.Group, imageRepository string, k8sVe
glog.Info("Caching tarball of preloaded images") glog.Info("Caching tarball of preloaded images")
return download.Preload(k8sVersion, cRuntime) return download.Preload(k8sVersion, cRuntime)
}) })
g.Wait() err := g.Wait()
return if err == nil {
glog.Infof("Finished downloading the preloaded tar for %s on %s", k8sVersion, cRuntime)
return // don't cache individual images if preload is successful.
}
glog.Errorf("Error downloading preloaded artifacts will continue without preload: %v", err)
} }
if !viper.GetBool("cache-images") { if !viper.GetBool("cache-images") {