[Fix] install.sh: start a new line before appending to a profile that does not end with one
Fixes #3951
This commit is contained in:
1 parent
d55a55c387
commit
e45c2df7c0
2 files changed
+68
No files matched your search
@@ -490,6 +490,9 @@ nvm_do_install() {
|
||||
# shellcheck disable=SC2016
|
||||
if ${BASH_OR_ZSH} && ! command grep -qc '$NVM_DIR/bash_completion' "$NVM_PROFILE"; then
|
||||
nvm_echo "=> Appending bash_completion source string to $NVM_PROFILE"
|
||||
if [ -n "$(command tail -c 1 "$NVM_PROFILE")" ]; then
|
||||
nvm_echo >> "$NVM_PROFILE"
|
||||
fi
|
||||
command printf '%b' "$COMPLETION_STR" >> "$NVM_PROFILE"
|
||||
else
|
||||
nvm_echo "=> bash_completion source string already in ${NVM_PROFILE}"
|
||||
|
||||
Reference in new issue
Block a user