Merge pull request #3265 from cydu-cloud/master

Update repo normalize error message to include name
This commit is contained in:
João Pereira 2021-02-06 16:10:21 +00:00 committed by GitHub
commit 66fae5e443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
package reference
import (
"errors"
"fmt"
"strings"
@ -42,7 +41,7 @@ func ParseNormalizedNamed(s string) (Named, error) {
remoteName = remainder
}
if strings.ToLower(remoteName) != remoteName {
return nil, errors.New("invalid reference format: repository name must be lowercase")
return nil, fmt.Errorf("invalid reference format: repository name (%s) must be lowercase", remoteName)
}
ref, err := Parse(domain + "/" + remainder)