Skip to content

Commit 9669641

Browse files
committed
Move manifestDigest assignment in ociImageDestination
Signed-off-by: Ayato Tokubi <[email protected]>
1 parent 877963f commit 9669641

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

image/oci/layout/oci_dest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,13 @@ func (d *ociImageDestination) PutManifest(ctx context.Context, m []byte, instanc
262262
if err := os.WriteFile(blobPath, m, 0644); err != nil {
263263
return err
264264
}
265-
d.manifestDigest = digest
266265

267266
if instanceDigest != nil {
268267
return nil
269268
}
269+
// d.manifestDigest is used for a single image (not a manifest list).
270+
// This should be placed after checking instanceDigest is nil.
271+
d.manifestDigest = digest
270272

271273
// If we had platform information, we'd build an imgspecv1.Platform structure here.
272274

0 commit comments

Comments
 (0)