Closed thernstig closed 3 years ago
@thernstig A breaking change, yes, but implementation-wise, just saving to a different directory, right?
Yes, that should be all there is to it.
@thernstig Sounds good to me.
@thernstig Feel free to send me a PR.
Any chance it could stay open till I do? :)
@thernstig I think this got closed when I migrated to the main
branch, otherwise I don't know why I closed this. I'll make sure to use XDG_DATA_HOME
in 2.0
.
I just released 2.0. Now we're using XDG_DATA_HOME to store nvm's state: version binaries, and the download index file.
To show case what I mean, I am going to paste the information another tool called direnv does in a recent release:
As such, it would make sense for nvm to also migrate from
XDG_CONFIG_HOME
toXDG_DATA_HOME
. The config is used for user-editable config whereas the data dir should be used for data written by the program such as nvm.One of many reasons to do this is that a lot of users utilize dotfile support to backup configuration data, and that is often done for the
XDG_CONFIG_HOME
dir. Since nvm downloads binaries, it would mean many users might commit binaries to their git repo if they do not take care. Users do not expect the config dir to contain binaries.