Browse Source

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

Ryan Wheale 8 years ago committed by Jordan Harband
parent
commit
1b2305232f
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 2
      install.sh
  2. 2
      test/install_script/nvm_install_dir

2
install.sh

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

2
test/install_script/nvm_install_dir

@ -19,7 +19,7 @@ unset NVM_DIR @@ -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…
Cancel
Save