Skip to content

Commit

Permalink
fix: should return empty manifest list when no referrers are found (#53)
Browse files Browse the repository at this point in the history
Resolves #51 

Signed-off-by: wangxiaoxuan273 <[email protected]>
  • Loading branch information
wangxiaoxuan273 authored Jan 5, 2023
1 parent 884c54b commit 2ba5caa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions registry/handlers/referrers.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func (h *referrersHandler) GetReferrers(w http.ResponseWriter, r *http.Request)
return
}

if referrers == nil {
referrers = []v1.Descriptor{}
}

response := v1.Index{
Versioned: specs.Versioned{SchemaVersion: 2},
MediaType: v1.MediaTypeImageIndex,
Expand Down

0 comments on commit 2ba5caa

Please sign in to comment.