From 2d89dc301ed834d74b07350c7d8567eee78f966d Mon Sep 17 00:00:00 2001 From: Samruddhi Khandale Date: Thu, 6 Oct 2022 13:41:34 -0500 Subject: Node: Fix nvm ownership (#199) * Node: Fix nvm ownership * remove 0002 --- src/node/devcontainer-feature.json | 2 +- src/node/install.sh | 4 +++- test/node/test.sh | 1 + 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 -- cgit v1.2.3