Unverified Commit 2d89dc30 authored by Samruddhi Khandale's avatar Samruddhi Khandale Committed by GitHub

Node: Fix nvm ownership (#199)

* Node: Fix nvm ownership

* remove 0002
parent a9441adf
{ {
"id": "node", "id": "node",
"version": "1.0.5", "version": "1.0.6",
"name": "Node.js (via nvm) and yarn", "name": "Node.js (via nvm) and yarn",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
"description": "Installs Node.js, nvm, yarn, and needed dependencies.", "description": "Installs Node.js, nvm, yarn, and needed dependencies.",
......
...@@ -120,7 +120,7 @@ umask 0002 ...@@ -120,7 +120,7 @@ umask 0002
usermod -a -G nvm ${USERNAME} usermod -a -G nvm ${USERNAME}
mkdir -p ${NVM_DIR} mkdir -p ${NVM_DIR}
chown "${USERNAME}:nvm" ${NVM_DIR} chown "${USERNAME}:nvm" ${NVM_DIR}
chmod g+s ${NVM_DIR} chmod -R g+r+w ${NVM_DIR}
su ${USERNAME} -c "$(cat << EOF su ${USERNAME} -c "$(cat << EOF
set -e set -e
umask 0002 umask 0002
...@@ -185,4 +185,6 @@ if [ "${INSTALL_TOOLS_FOR_NODE_GYP}" = "true" ]; then ...@@ -185,4 +185,6 @@ if [ "${INSTALL_TOOLS_FOR_NODE_GYP}" = "true" ]; then
fi fi
fi fi
find "${NVM_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
echo "Done!" echo "Done!"
...@@ -7,6 +7,7 @@ source dev-container-features-test-lib ...@@ -7,6 +7,7 @@ source dev-container-features-test-lib
# Definition specific tests # Definition specific tests
check "version" node --version check "version" node --version
check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10"
# Report result # Report result
reportResults reportResults
\ No newline at end of file
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