Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianburth committed Dec 13, 2023
1 parent f412bca commit 2ad2b6a
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,6 @@ func (c *ComponentVersionContainer) evalLayer(s compdesc.AccessSpec) (compdesc.A
}
d = &artdesc.Descriptor{Digest: digest.Digest(a.LocalReference), MediaType: a.GetMimeType()}
}
if a, ok := spec.(*localblob.AccessSpec); ok {
if ok, _ := artdesc.IsDigest(a.LocalReference); !ok {
return s, 0, errors.ErrInvalid("digest", a.LocalReference)
}
d = &artdesc.Descriptor{Digest: digest.Digest(a.LocalReference), MediaType: a.GetMimeType()}
}
if d != nil {
// find layer
layers := c.manifest.GetDescriptor().Layers
Expand Down

0 comments on commit 2ad2b6a

Please sign in to comment.