Skip to content

Commit

Permalink
chore: just a tiny refactor in the returning code (#1221)
Browse files Browse the repository at this point in the history
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

Signed-off-by: Gergely Brautigam <[email protected]>
  • Loading branch information
Skarlso authored Jan 6, 2025
1 parent 48c3ea2 commit b88e60f
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 b88e60f

Please sign in to comment.