Skip to content

Commit

Permalink
fix: panic when image pull fails (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
colesnodgrass authored Dec 12, 2024
1 parent 0a0dcba commit 164cad1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cmd/local/k8s/load_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ func loadImages(ctx context.Context, dockerClient docker.Client, nodes []nodesli
pterm.Debug.Printfln("error pulling image %s", err)
// image pull errors are intentionally dropped because we're in a goroutine,
// and because we don't want to interrupt other image pulls.
} else {
defer r.Close()
io.Copy(io.Discard, r)
}
defer r.Close()
io.Copy(io.Discard, r)
}(img)
}
wg.Wait()
Expand Down

0 comments on commit 164cad1

Please sign in to comment.