-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
rbenv violates XDG basedir spec on linux #811
Comments
How do you expect rbenv to comply with the XDG spec? |
@sandys rbenv can be installed anywhere. Simply export Though, personally, I don't think rbenv belongs under XDG_CONFIG_HOME. rbenv is an app, not a configuration file. I set |
Agreed. Since |
It seems like they're mostly data files? |
It still greatly disappoints me that the folder is hardcoded to My last comment still feels relevant — there is an XDG convention for where to store data files. I'd love to |
As mentioned earlier in this thread, the installation path is not hard coded. You can install it anywhere you like and set RBENV_ROOT accordingly. |
Hmm, last time I tried this, it didn't do what it was supposed to. But I think this may have been due to interactions with projects I no longer have to run locally, so I'll give it another go. 🤞 |
|
rbenv's default directory
If we wanted to support XDG, we could default to rbenv-specific locations under XDG_CONFIG_HOME, XDG_DATA_HOME, and XDG_CACHE_HOME. From what I understand about XDG, this would be following its spec to the letter. However, I don't feel strongly that rbenv should move in this direction, mostly because of backwards compatibility and UX concerns. I do not plan large functional changes to rbenv if I can avoid it, and this would be one such change. Second, as others already pointed out, anyone can already override where rbenv stores its files by setting RBENV_ROOT and RUBY_BUILD_CACHE_PATH. TL;DR: yes, it rbenv wanted to be a good linux citizen, we would have respected XDG, but since we historically did not and have our own environment variables for changing location, it might make the most sense for the stability of the project to not try to shoehorn XDG compatibility in. Thoughts? |
I would vote to see these changes implemented. It is not as simple as |
Using the new |
See also: - https://github.com/rbenv/rbenv/blob/d6bb1c63964304d9d3cdac783a65d66d56b35736/README.md#environment-variables - rbenv/rbenv#811 - rbenv/rbenv#1146 - https://wiki.archlinux.org/title/XDG_Base_Directory#Partial - https://wiki.archlinux.jp/index.php/XDG_Base_Directory#.E9.83.A8.E5.88.86.E7.9A.84.E3.81.AB.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88.E3.81.97.E3.81.A6.E3.81.84.E3.82.8B.E3.82.BD.E3.83.95.E3.83.88.E3.82.A6.E3.82.A7.E3.82.A2
according to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
rbenv is one of the most popular tools on Linux - it would be awesome if you guys could comply with the spec.
The text was updated successfully, but these errors were encountered: