Unverified Commit 2951f048 authored by Vatsal Gupta's avatar Vatsal Gupta Committed by GitHub

Fixed Nvm Source Issue(#1078) (#1114)

* Fixed Nvm Source Issue

* Fix: Test Scenario Failure

* Updated node feature version

* Incorporated Review Comment
parent 90824ffb
{
"id": "node",
"version": "1.6.0",
"version": "1.6.1",
"name": "Node.js (via nvm), yarn and pnpm",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
......
......@@ -227,7 +227,7 @@ install_yarn() {
# Yum/DNF want to install nodejs dependencies, we'll use NPM to install yarn
su ${USERNAME} -c "umask 0002 && . '${NVM_DIR}/nvm.sh' && nvm use ${_ver} && npm install --global yarn"
fi
else
else
echo "Yarn already installed."
fi
fi
......@@ -309,7 +309,7 @@ curl -so- "https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.
curl -so- "https://raw.githubusercontent.com/nvm-sh/nvm/\${PREV_NVM_VERSION}/install.sh" | bash
NVM_VERSION="\${PREV_NVM_VERSION}"
}
source "${NVM_DIR}/nvm.sh"
[ -s "${NVM_DIR}/nvm.sh" ] && source "${NVM_DIR}/nvm.sh"
if [ "${NODE_VERSION}" != "" ]; then
nvm alias default "${NODE_VERSION}"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment