Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 6bb7605

Browse files
authored
[node-debian.sh] - add safe.directory for nvm install (.nvs folder)
1 parent f2d3ec2 commit 6bb7605

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script-library/node-debian.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,15 @@ su ${USERNAME} -c "$(cat << EOF
126126
umask 0002
127127
# Do not update profile - we'll do this manually
128128
export PROFILE=/dev/null
129+
echo "temporarily add /home/${USERNAME}/.nvs as git safe directory for nvm install script."
130+
git config --global --add safe.directory /home/${USERNAME}/.nvs
129131
curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash
130132
source ${NVM_DIR}/nvm.sh
131133
if [ "${NODE_VERSION}" != "" ]; then
132134
nvm alias default ${NODE_VERSION}
133135
fi
134136
nvm clear-cache
137+
git config --global --unset safe.directory /home/${USERNAME}/.nvs
135138
EOF
136139
)" 2>&1
137140
# Update rc files

0 commit comments

Comments
 (0)