oras-project / oras-go

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

fix: add missing operation to fs path error #799

Closed qweeah closed 1 month ago

qweeah commented 1 month ago

When opening a folder as OCI image layout and there is no oci-layout file exists, the error would be

failed to open OCI layout file: oci-layout: file does not exist

There is a duplicated space in the error string, because the Op field is missing in the returned fs.PathError. With fix in this PR, the return error would be

failed to open OCI layout file: open oci-layout: file does not exist

Fixes #640

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 77.88%. Comparing base (c8c2048) to head (f3a6d39).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #799 +/- ## ========================================== - Coverage 77.92% 77.88% -0.05% ========================================== Files 63 63 Lines 4694 4694 ========================================== - Hits 3658 3656 -2 - Misses 656 657 +1 - Partials 380 381 +1 ```

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