Skip to content

Commit 5dbf179

Browse files
feat: fix harbor 仓库中存在空目录导致获取镜像列表失败的BUG
1 parent 4bb6036 commit 5dbf179

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/util/imagerepo/repos/harbor.go

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func (c *harborClient) ListImages(project string) (images []string, err error) {
6565
repoName := strings.Replace(r.Name, project+"/", "", -1)
6666
body, _, err2 := c.HttpClient.Get(fmt.Sprintf("%s/%s/%s", repoUrl, repoName, artifactUrl))
6767
if err2 != nil {
68+
if strings.Contains(err2.Error(), "404") {
69+
continue
70+
}
6871
err = err2
6972
return
7073
}

0 commit comments

Comments
 (0)