Skip to content

Commit

Permalink
Merge pull request #1418 from mtrmac/comment-link
Browse files Browse the repository at this point in the history
Link the two variants of cannotModifyManifest*Reason together.
  • Loading branch information
rhatdan committed Nov 29, 2021
2 parents cba26ff + a84d4a8 commit 4f6d0b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions copy/copy.go
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 4f6d0b4

Please sign in to comment.