Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing operation to fs path error #799

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Jul 25, 2024

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

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Wwwsylvia Wwwsylvia merged commit bacf8f0 into oras-project:main Jul 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve the returned error of oci.NewFromTar when the passed-in path is not a tarfile
3 participants