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

clio should have a config field type that has to be a path, and it should expand homedir etc. #77

Open
willmurphyscode opened this issue Nov 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@willmurphyscode
Copy link
Contributor

willmurphyscode commented Nov 21, 2024

What would you like to be added:

Clio should know that certain config fields represent paths on the local filesystem, and should do some common expansions, for example ~, $HOME, and $TMPDIR, so that these can be expanded.

Probably we want something like type LocalPath = string in the config, and then config structs in clio applications can declare fields to be LocalPath instead of string in order to get the expansion behavior.

Why is this needed:

anchore/grype#2024

@willmurphyscode willmurphyscode added the enhancement New feature or request label Nov 21, 2024
@willmurphyscode willmurphyscode moved this to Ready in OSS Nov 21, 2024
@kzantow
Copy link
Contributor

kzantow commented Nov 21, 2024

This would need to be a new type, which ends up being a bit annoying at times:type LocalPath string (no =; it can't use aliasing, because we need a new type to implement the PostLoad interface). It would basically work like secrets do, just to update the value using homedir or whatnot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

2 participants