Skip to content

Commit

Permalink
ggg
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Apr 1, 2024
1 parent cc6a184 commit 86e98bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sign/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ func (s *Signer) ImagesSigned(ctx context.Context, refs ...string) (*sync.Map, e
}
if _, err := s.impl.Digest(repoDigestToSig(repo, digest), crane.WithTransport(tr)); err != nil {
if transportErr, ok := err.(*transport.Error); ok && len(transportErr.Errors) > 0 {
fmt.Println(err)
if transportErr.Errors[0].Code == transport.ManifestInvalidErrorCode {
fmt.Println(transportErr, ok, transportErr.Errors[0].Code)
if transportErr.Errors[0].Code == transport.ManifestUnknownErrorCode {
fmt.Println("22>>>>>>!!>>>")
res.Store(ref, false)
s.signedRefs.Set(ref, false, ttlcache.DefaultTTL)
Expand Down
2 changes: 1 addition & 1 deletion sign/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ func TestImagesSigned(t *testing.T) {
mock.NewWithContextReturns(&testRoundTripper{}, nil)
mock.DigestReturnsOnCall(1, "", &transport.Error{
Errors: []transport.Diagnostic{
{Code: transport.ManifestInvalidErrorCode},
{Code: transport.ManifestUnknownErrorCode},
},
})
},
Expand Down

0 comments on commit 86e98bd

Please sign in to comment.