Skip to content

Commit

Permalink
Fix panic when remote differ returns empty result
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Apr 30, 2023
1 parent 54732fa commit 0d97523
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions diff/proxy/differ.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func (r *diffRemote) Compare(ctx context.Context, a, b []mount.Mount, opts ...di
}

func toDescriptor(d *types.Descriptor) ocispec.Descriptor {
if d == nil {
return ocispec.Descriptor{}
}
return ocispec.Descriptor{
MediaType: d.MediaType,
Digest: digest.Digest(d.Digest),
Expand Down

0 comments on commit 0d97523

Please sign in to comment.