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

relative paths does not work in Infra.toml for signing_keys #463

Open
mikn opened this issue Feb 22, 2025 · 0 comments
Open

relative paths does not work in Infra.toml for signing_keys #463

mikn opened this issue Feb 22, 2025 · 0 comments

Comments

@mikn
Copy link

mikn commented Feb 22, 2025

Here you call this function: https://github.com/bottlerocket-os/twoliter/blob/develop/tools/pubsys-config/src/lib.rs#L185C53-L185C67

Which according to docs;
https://docs.rs/url/latest/url/struct.Url.html#method.from_file_path

requires the path to be absolute. If you try to create an Infra.toml that refers to a key relative to it, (as you have an example for in the Infra.toml.example file) it will fail with the relatively unintuitive error: Unable to build URL from signing key for repo 'default'

The error could be improved by passing on the error from the inner error, and also perhaps the actual parameter that caused the error. I am unsure how you could handle this without not using the url crate as it doesn't seem to carry any functions to allow for relative paths - but I am also unsure why you would need to support an URI-style path to the file here?

@mikn mikn changed the title relative paths (as per the example) does not work in Infra.toml for signing_keys relative paths does not work in Infra.toml for signing_keys Feb 24, 2025
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

1 participant