From 049c426dca3e41f4f6533369b12d076afcb20869 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Fri, 25 Jun 2021 13:28:29 -0700 Subject: [PATCH] add comments --- pkg/minikube/download/image.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/minikube/download/image.go b/pkg/minikube/download/image.go index b439742d3088..f922caac1a1d 100644 --- a/pkg/minikube/download/image.go +++ b/pkg/minikube/download/image.go @@ -180,6 +180,9 @@ func parseImage(img string) (*name.Tag, name.Reference, error) { if !ok { return nil, nil, errors.Wrap(err, "new ref") } + // ErrBadName means img contains no digest + // It happens if its value is name:tag for example. + // In this case we want to give it a second chance and try to parse it one more time using name.NewTag(img) tag, err := name.NewTag(img) if err != nil { return nil, nil, errors.Wrap(err, "new ref")