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

sevctl export: unable to create output file #92

Closed
wainersm opened this issue Dec 8, 2022 · 2 comments
Closed

sevctl export: unable to create output file #92

wainersm opened this issue Dec 8, 2022 · 2 comments

Comments

@wainersm
Copy link

wainersm commented Dec 8, 2022

sevclt export doesn't create the cerficate file if basedir doesn't exist:

$ sudo ./sevctl export --full /opt/sev/cert_chain.cert
error: unable to create output file

It works if I create /opt/sev beforehand.

Even if it works as designed, I think the error message could be clear.

@wainersm
Copy link
Author

wainersm commented Dec 8, 2022

ah, built from source (commit 16a2435)

@crobinso
Copy link
Contributor

My PR here improves global error reporting slightly, so the underlying API error isn't hidden. It's not the most useful in this case though:

Error: unable to create output file

Caused by:
    No such file or directory (os error 2)

I don't think we should try to create the parent directory, that's not typical for cli tools in my experience. But we could add the filename to the first error message easy enough

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

No branches or pull requests

3 participants