[Fix] Determine correct sub directory if XDG_CONFIG_HOME is set
With the environment variable XDG_CONFIG_HOME set, the installation script uses the directory $XDG_CONFIG_HOME/nvm now. Before the change the variable's value with "/nvm" cut off was used, which usually results in an installation without any subdirectory.
This commit is contained in:
1 parent
3664744e3b
commit
45c1b84794
1 file changed
+3
-3
+3
-3
@@ -7,10 +7,10 @@ nvm_has() {
|
||||
}
|
||||
|
||||
nvm_default_install_dir() {
|
||||
if [ -n "$XDG_CONFIG_HOME" ]; then
|
||||
printf %s "${XDG_CONFIG_HOME/nvm}"
|
||||
if [ -n "${XDG_CONFIG_HOME-}" ]; then
|
||||
printf %s "${XDG_CONFIG_HOME}/nvm"
|
||||
else
|
||||
printf %s "$HOME/.nvm"
|
||||
printf %s "${HOME}/.nvm"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user