Skip to content

Commit

Permalink
add comment to clarify change in checking logic
Browse files Browse the repository at this point in the history
  • Loading branch information
prezha committed Nov 28, 2023
1 parent a5d281e commit 199a0e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/minikube/cruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ func (r *Containerd) Disable() error {
func (r *Containerd) ImageExists(name string, sha string) bool {
klog.Infof("Checking existence of image with name %q and sha %q", name, sha)
c := exec.Command("sudo", "ctr", "-n=k8s.io", "images", "check")
// note: image name and image id's sha can be on different lines in ctr output
if rr, err := r.Runner.RunCmd(c); err != nil ||
!strings.Contains(rr.Output(), name) ||
(sha != "" && !strings.Contains(rr.Output(), sha)) {
Expand Down

0 comments on commit 199a0e3

Please sign in to comment.