Update comments

This commit is contained in:
Sander Declerck 2026-01-06 10:53:24 +01:00
parent 10a2407b32
commit 5a28d6646f
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View file

@ -161,7 +161,9 @@ remove_volta_installation() {
# Check and uninstall nvm-managed package if present across all Node versions
remove_nvm_installation() {
# nvm is a shell function, not a binary, so we need to source it first
# This script is run in sh shell for greatest compatibility.
# Because nvm is usually setup in bash/zsh/fish startup scripts, we need to source it.
# Otherwise it won't be available in sh.
if [ -s "$HOME/.nvm/nvm.sh" ]; then
# Source nvm to make it available in this script
. "$HOME/.nvm/nvm.sh" >/dev/null 2>&1
@ -174,7 +176,6 @@ remove_nvm_installation() {
return
fi
# Get list of installed Node versions
nvm_versions=$(nvm list 2>/dev/null | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' || echo "")
if [ -z "$nvm_versions" ]; then