Skip to content

Commit

Permalink
Link the two variants of cannotModifyManifest*Reason together.
Browse files Browse the repository at this point in the history
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Nov 29, 2021
1 parent 2aabeb0 commit a84d4a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ func (c *copier) copyMultipleImages(ctx context.Context, policyContext *signatur

// Determine if we're allowed to modify the manifest list.
// If we can, set to the empty string. If we can't, set to the reason why.
// Compare, and perhaps keep in sync with, the version in copyOneImage.
cannotModifyManifestListReason := ""
if len(sigs) > 0 {
cannotModifyManifestListReason = "Would invalidate signatures"
Expand Down Expand Up @@ -663,6 +664,7 @@ func (c *copier) copyOneImage(ctx context.Context, policyContext *signature.Poli

// Determine if we're allowed to modify the manifest.
// If we can, set to the empty string. If we can't, set to the reason why.
// Compare, and perhaps keep in sync with, the version in copyMultipleImages.
cannotModifyManifestReason := ""
if len(sigs) > 0 {
cannotModifyManifestReason = "Would invalidate signatures"
Expand Down

0 comments on commit a84d4a8

Please sign in to comment.