Skip to content

Commit a39de6b

Browse files
committed
fix: deal with missing attestations
1 parent 946855e commit a39de6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/docker.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ func (s *Server) prepareIndexManifestForDestination(
8282
indexManifest.Manifests = make([]cr.Descriptor, 0, len(images)+len(attestations))
8383
for digest, image := range images {
8484
indexManifest.Manifests = append(indexManifest.Manifests, *image)
85-
indexManifest.Manifests = append(indexManifest.Manifests, *attestations[digest])
85+
if attestation, ok := attestations[digest]; ok {
86+
indexManifest.Manifests = append(indexManifest.Manifests, *attestation)
87+
}
8688
}
8789

8890
return utils.FlattenErrors(errs)

0 commit comments

Comments
 (0)