diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2022-10-29 02:50:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-29 02:50:48 +0300 |
commit | 9366ef7ed18ed63a360d343338bda4ce41e62d09 (patch) | |
tree | 524e342dfb384d708a1b9568f41d3dc60d0b417e | |
parent | f1c981d0643f8791c8bdc586cf14851b8c236bf1 (diff) |
Node: Fix failure when `version:none` (#247)
fix version:none
-rw-r--r-- | src/node/devcontainer-feature.json | 2 | ||||
-rwxr-xr-x | src/node/install.sh | 1 | ||||
-rw-r--r-- | test/node/scenarios.json | 9 | ||||
-rwxr-xr-x | test/node/version_none.sh | 12 |
4 files changed, 23 insertions, 1 deletions
diff --git a/src/node/devcontainer-feature.json b/src/node/devcontainer-feature.json index cdc2fec..538ecb2 100644 --- a/src/node/devcontainer-feature.json +++ b/src/node/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "node", - "version": "1.1.0", + "version": "1.1.1", "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 cc5e1dc..f51306e 100755 --- a/src/node/install.sh +++ b/src/node/install.sh @@ -205,6 +205,7 @@ rm -rf /var/lib/apt/lists/* # Ensure privs are correct for installed node versions. Unfortunately the # way nvm installs node versions pulls privs from the tar which does not # have group write set. We need this when the gid/uid is updated. +mkdir -p "${NVM_DIR}/versions" chmod -R g+rw "${NVM_DIR}/versions" echo "Done!" diff --git a/test/node/scenarios.json b/test/node/scenarios.json index 8f93d82..1240e61 100644 --- a/test/node/scenarios.json +++ b/test/node/scenarios.json @@ -16,5 +16,14 @@ "version": "latest" } } + }, + "version_none": { + "image": "mcr.microsoft.com/devcontainers/base", + "remoteUser": "vscode", + "features": { + "node": { + "version": "none" + } + } } }
\ No newline at end of file diff --git a/test/node/version_none.sh b/test/node/version_none.sh new file mode 100755 index 0000000..c7c9e57 --- /dev/null +++ b/test/node/version_none.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10" + +# Report result +reportResults |