Merge 03576d614c1725d07e72ac23ebb59009c9ea2b06 into 99352a64d25ce27d49ff6a449663ce3d7c12e5b5

This commit is contained in:
adssib 2025-04-09 18:13:10 +02:00 committed by GitHub
commit 800b51d67c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,13 @@ unset NVM_CD_FLAGS
\. "$DIR/nvm.sh" --no-use
if [ -n "$NODE_VERSION" ]; then
CURRENT_VERSION=$(nvm current)
if [ "$CURRENT_VERSION" == "$NODE_VERSION" ]; then
echo "Node.js version $NODE_VERSION is already active."
exit 0
fi
nvm use "$NODE_VERSION" > /dev/null || exit 127
elif ! nvm use >/dev/null 2>&1; then
echo "No NODE_VERSION provided; no .nvmrc file found" >&2