Browse Source

[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.
Bastian Fuchs 6 years ago committed by Jordan Harband
parent
commit
45c1b84794
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 6
      install.sh

6
install.sh

@ -7,10 +7,10 @@ nvm_has() { @@ -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
}

Loading…
Cancel
Save