Skip to content

Commit

Permalink
fix(common): fix panic "unexpected regexp find submatch for reference"
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
  • Loading branch information
alexey-igrychev committed Jun 7, 2024
1 parent 22db874 commit 45ecd0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/docker_registry/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (api *api) parseReferenceParts(reference string) (referenceParts, error) {
// res[3] digest
res := dockerReference.ReferenceRegexp.FindStringSubmatch(reference)
if len(res) != 4 {
panic(fmt.Sprintf("unexpected regexp find submatch result %v for reference %q (%d)", res, reference, len(res)))
return referenceParts{}, fmt.Errorf("unexpected reference %q", reference)
}

referenceParts := referenceParts{}
Expand Down

0 comments on commit 45ecd0e

Please sign in to comment.