aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/node/devcontainer-feature.json2
-rwxr-xr-xsrc/node/install.sh4
-rwxr-xr-xtest/node/test.sh1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/node/devcontainer-feature.json b/src/node/devcontainer-feature.json
index 965df90..8f92365 100644
--- a/src/node/devcontainer-feature.json
+++ b/src/node/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "node",
- "version": "1.0.5",
+ "version": "1.0.6",
"name": "Node.js (via nvm) and yarn",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
"description": "Installs Node.js, nvm, yarn, and needed dependencies.",
diff --git a/src/node/install.sh b/src/node/install.sh
index 8eae62e..6a237d6 100755
--- a/src/node/install.sh
+++ b/src/node/install.sh
@@ -120,7 +120,7 @@ umask 0002
usermod -a -G nvm ${USERNAME}
mkdir -p ${NVM_DIR}
chown "${USERNAME}:nvm" ${NVM_DIR}
-chmod g+s ${NVM_DIR}
+chmod -R g+r+w ${NVM_DIR}
su ${USERNAME} -c "$(cat << EOF
set -e
umask 0002
@@ -185,4 +185,6 @@ if [ "${INSTALL_TOOLS_FOR_NODE_GYP}" = "true" ]; then
fi
fi
+find "${NVM_DIR}" -type d -print0 | xargs -n 1 -0 chmod g+s
+
echo "Done!"
diff --git a/test/node/test.sh b/test/node/test.sh
index 3478478..6b6804d 100755
--- a/test/node/test.sh
+++ b/test/node/test.sh
@@ -7,6 +7,7 @@ source dev-container-features-test-lib
# Definition specific tests
check "version" node --version
+check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10"
# Report result
reportResults \ No newline at end of file