Skip to content

Commit

Permalink
Merge pull request #4082 from 11janci/jjanik-fix-build
Browse files Browse the repository at this point in the history
Fix broken build due to bad merge: restore waitCacheImages function.
  • Loading branch information
tstromberg authored Apr 12, 2019
2 parents f9bf001 + 6a2e7ef commit 4ee6648
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,7 @@ func runStart(cmd *cobra.Command, args []string) {
cr := configureRuntimes(host, runner)

// prepareHostEnvironment uses the downloaded images, so we need to wait for background task completion.
if viper.GetBool(cacheImages) {
console.OutStyle("waiting", "Waiting for image downloads to complete ...")
if err := cacheGroup.Wait(); err != nil {
glog.Errorln("Error caching images: ", err)
}
}
waitCacheImages(&cacheGroup)

bs := prepareHostEnvironment(m, config.KubernetesConfig)

Expand Down Expand Up @@ -294,6 +289,17 @@ func beginCacheImages(g *errgroup.Group, k8sVersion string) {
})
}

// waitCacheImages blocks until the image cache jobs complete
func waitCacheImages(g *errgroup.Group) {
if !viper.GetBool(cacheImages) {
return
}
console.OutStyle("waiting", "Waiting for image downloads to complete ...")
if err := g.Wait(); err != nil {
glog.Errorln("Error caching images: ", err)
}
}

// generateConfig generates cfg.Config based on flags and supplied arguments
func generateConfig(cmd *cobra.Command, k8sVersion string) (cfg.Config, error) {
r, err := cruntime.New(cruntime.Config{Type: viper.GetString(containerRuntime)})
Expand Down

0 comments on commit 4ee6648

Please sign in to comment.