move exec inside func
parent
9eae9e544c
commit
3bd1608954
|
@ -100,11 +100,10 @@ func generateTarball(kubernetesVersion, containerRuntime, tarballFilename string
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, img := range imgs {
|
for _, img := range imgs {
|
||||||
|
pull := func() error {
|
||||||
cmd := imagePullCommand(containerRuntime, img)
|
cmd := imagePullCommand(containerRuntime, img)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
|
||||||
pull := func() error {
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
time.Sleep(time.Second) // to avoid error: : exec: already started
|
time.Sleep(time.Second) // to avoid error: : exec: already started
|
||||||
return errors.Wrapf(err, "pulling image %s", img)
|
return errors.Wrapf(err, "pulling image %s", img)
|
||||||
|
|
Loading…
Reference in New Issue