add comment to clarify change in checking logic
parent
a5d281e284
commit
199a0e3eae
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue