Skip to content

Commit

Permalink
ref: just a tiny refactor in the returning code
Browse files Browse the repository at this point in the history
Signed-off-by: Gergely Brautigam <[email protected]>
  • Loading branch information
Skarlso committed Jan 6, 2025
1 parent b20d027 commit 66066e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/tech/oras/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (c *OrasFetcher) resolveDescriptor(ctx context.Context, desc ociv1.Descript
if err != nil {
return ociv1.Descriptor{}, fmt.Errorf("failed to resolve descriptor %q: %w", desc.Digest.String(), err)
}

return desc, nil
}

Expand All @@ -79,10 +80,9 @@ func (c *OrasFetcher) resolveDescriptor(ctx context.Context, desc ociv1.Descript

return ociv1.Descriptor{}, fmt.Errorf("failed to resolve manifest %q: %w", desc.Digest.String(), err)
}
desc = mdesc
} else {
desc = bdesc

return mdesc, nil
}

return desc, err
return bdesc, err
}

0 comments on commit 66066e6

Please sign in to comment.