mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
Merge pull request #1605 from PeterDaveHello/fix-install.sh
[Fix] install.sh shouldn't use not existed variable
This commit is contained in:
commit
62fb0d0ad6
@ -330,9 +330,12 @@ nvm_do_install() {
|
|||||||
BASH_OR_ZSH=false
|
BASH_OR_ZSH=false
|
||||||
|
|
||||||
if [ -z "${NVM_PROFILE-}" ] ; then
|
if [ -z "${NVM_PROFILE-}" ] ; then
|
||||||
echo "=> Profile not found. Tried ${NVM_PROFILE} (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
|
local TRIED_PROFILE
|
||||||
|
if [ -n "${PROFILE}" ]; then
|
||||||
|
TRIED_PROFILE="${NVM_PROFILE} (as defined in \$PROFILE), "
|
||||||
|
fi
|
||||||
|
echo "=> Profile not found. Tried ${TRIED_PROFILE-}~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
|
||||||
echo "=> Create one of them and run this script again"
|
echo "=> Create one of them and run this script again"
|
||||||
echo "=> Create it (touch ${NVM_PROFILE}) and run this script again"
|
|
||||||
echo " OR"
|
echo " OR"
|
||||||
echo "=> Append the following lines to the correct file yourself:"
|
echo "=> Append the following lines to the correct file yourself:"
|
||||||
command printf "${SOURCE_STR}"
|
command printf "${SOURCE_STR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user