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
Support XDG base directory specification #5807
Comments
I'd be fine with this if it were supported farther up the chain. DDEV uses https://pkg.go.dev/os#UserHomeDir to figure out the homedir While XDG base directory is a super-valid idea, it's really linux-oriented, right? And DDEV is very much for many different environments. |
It looks like you could (and should) use UserConfigDir instead of UserHomeDir. |
Sounds promising. Interested in doing a PR? |
Thanks, I took a crack at a PR: #5813 It just respects XDG_CONFIG_HOME for now. You may want to adopt other parts of XDG in the future, but this is good enough for me. |
Is there an existing issue for this?
Is your feature request related to a problem?
I'm frustrated when software such as DDEV doesn't respect the XDG base directory specification, leading to a cluttered home directory fully of one-off config directories like
~/.ddev
.Describe your solution
Follow the XDG base directory spec. For instance, in the absence of any XDG environment variables, move
~/.ddev
to~/.config/ddev
. If XDG_CONFIG_HOME is set, move~/.ddev
to$XDG_CONFIG_HOME/ddev
.As a transitional solution (so this doesn't need to be a breaking change), load and use the
~/.ddev
directory if it already exists instead of following XDG_CONFIG_HOME.Note that there are other XDG directories besides the config home; I haven't investigated whether DDEV can or should make use of those.
Describe alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: