[install script] Use `$HOME` variable in `NVM_DIR`
parent
f1a5f2a15f
commit
1b2305232f
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue