Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(images-imports): added import type=ImageID into validation
  • Loading branch information
distorhead committed Jan 31, 2022
1 parent 6298d3d commit b58eb07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/config/dependency_import.go
Expand Up @@ -15,7 +15,7 @@ type DependencyImport struct {

func (i *DependencyImport) validate() error {
switch i.Type {
case ImageNameImport, ImageTagImport, ImageRepoImport:
case ImageNameImport, ImageTagImport, ImageRepoImport, ImageIDImport:
default:
return newDetailedConfigError(fmt.Sprintf("invalid `type: %s` for dependency import, expected one of: %s", i.Type, strings.Join([]string{string(ImageNameImport), string(ImageTagImport), string(ImageRepoImport)}, ", ")), i.raw, i.raw.rawDependency.doc())
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/docker_registry/api.go
Expand Up @@ -349,7 +349,7 @@ func (api *api) ParseReferenceParts(reference string) (referenceParts, error) {
// validate reference
parsedReference, err := name.ParseReference(reference, api.parseReferenceOptions()...)
if err != nil {
return referenceParts{}, fmt.Errorf("unable to parse reference: %s", err)
return referenceParts{}, fmt.Errorf("unable to parse reference %q: %s", reference, err)
}

res := dockerReference.ReferenceRegexp.FindStringSubmatch(reference)
Expand Down

0 comments on commit b58eb07

Please sign in to comment.