[install script] Use `$HOME` variable in `NVM_DIR`

Ryan Wheale 2017-01-12 10:55:56 -07:00 committed by Jordan Harband
parent f1a5f2a15f
commit 1b2305232f
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ nvm_has() {
}
nvm_install_dir() {
echo "${NVM_DIR:-"$HOME/.nvm"}"
printf %s "${NVM_DIR:-"$HOME/.nvm"}" | sed "s:^$HOME:\$HOME:"
}
nvm_latest_version() {

View File

@ -19,7 +19,7 @@ unset NVM_DIR
# NVM_DIR is not set
install_dir=$(nvm_install_dir)
[ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"
[ "_$install_dir" = "_\$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"
cleanup