oras-project / oras-go

ORAS Go library
https://oras.land
Apache License 2.0
172 stars 94 forks source link

fix: update error returned when `oci.NewFromTar` is used with a non-tar file #793

Open ADorigi opened 1 month ago

ADorigi commented 1 month ago

fixes #640

This pull request includes the following changes:

Wwwsylvia commented 1 month ago

Hello @ADorigi , thank you for the PR! I just reviewed it and left some comments. By the way, can you follow Conventional Commits and rename the PR title to something like "feat: ..."?

ADorigi commented 1 month ago

Hi @Wwwsylvia Please check the updates. Now the check for non-tar file takes place in tfs.indexEntries()

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.03%. Comparing base (c8c2048) to head (51ec1d4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #793 +/- ## ========================================== + Coverage 77.92% 78.03% +0.10% ========================================== Files 63 63 Lines 4694 4698 +4 ========================================== + Hits 3658 3666 +8 + Misses 656 654 -2 + Partials 380 378 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Wwwsylvia commented 1 month ago

Hi @ADorigi , the updated PR looks good overall. I left a few nit comments.

ADorigi commented 1 month ago

Hi @Wwwsylvia I made the minor changes and updated the error message.

Wwwsylvia commented 1 month ago

cc @qweeah who opened the original issue