mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 04:21:36 +01:00
fix a small issue, that if there is no manifest in huawei image repository, should return false rather than err
Signed-off-by: Yuan Lei <371304458@qq.com>
This commit is contained in:
parent
7ee009f1d2
commit
8205e87d4d
@ -98,6 +98,9 @@ func (a *adapter) ManifestExist(repository, reference string) (exist bool, diges
|
||||
defer resp.Body.Close()
|
||||
code := resp.StatusCode
|
||||
if code >= 300 || code < 200 {
|
||||
if code == 404 {
|
||||
return false, digest, nil
|
||||
}
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
return exist, digest, fmt.Errorf("[%d][%s]", code, string(body))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user