Skip to content

Commit

Permalink
Fix logic to parse registry for images in higher realms (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
snehaoracle authored Apr 24, 2024
1 parent 20439c6 commit cf598f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,12 @@ func getRepositoryName(ff *common.FuncFileV20180708) (string, error) {
if len(parts) != 2 {
return "", fmt.Errorf("cannot parse image %s", ff.ImageNameV20180708())
}
pattern := regexp.MustCompile("(.*)\\.ocir\\.io/([^/]*)/(.*)")
pattern := regexp.MustCompile("(.*)ocir\\.([^/]*)/([^/]*)/(.*)")
parts = pattern.FindStringSubmatch(parts[0])
if len(parts) != 4 {
if len(parts) != 5 {
return "", fmt.Errorf("cannot parse registry for image %s", ff.ImageNameV20180708())
}
return parts[3], nil
return parts[4], nil
}

func getImageDigest(ff *common.FuncFileV20180708) (string, error) {
Expand Down

0 comments on commit cf598f9

Please sign in to comment.