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

Feat: better error message when you pass --oci-dir a directory that exists but is not an OCI layout. #638

Closed
mikemccracken opened this issue Aug 28, 2024 · 0 comments · Fixed by #643

Comments

@mikemccracken
Copy link
Contributor

Is your feature request related to a problem? Please describe.

if you

mkdir ocidir
stacker --oci-dir ocidir build 

you will get something like

error: open CAS: validate: read oci-layout: invalid image detected
error: exit status 1

but no info about what it's trying to do or what path the problem is at.

if you pass an oci-dir that is already an oci layout, it's fine. or if it doesnt' yet exist, stacker just creates it and you're fine.

this can be confusing.

Describe the solution you'd like

I think either stacker should at least tell you the path of what it's trying to open as an OCI layout (the oci-dir), and that it's expecting oci-dir to either be a valid layout or a nonexistent path.

even better, stacker should allow passing empty dirs and just create the layout there as if it was a nonexistent path.

if it's a directory that is not empty, but is also not an OCI layout, a nice error message explaining what's expected seems OK in that case.

Describe alternatives you've considered

No response

Additional context

No response

@mikemccracken mikemccracken linked a pull request Sep 10, 2024 that will close this issue
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 a pull request may close this issue.

1 participant