Node: Fix regression - Installing in ubuntu 18.04 (#319)
Node: Fix regression https://github.com/devcontainers/features/issues/317
This commit is contained in:
parent
46dfa11ecd
commit
7a47fbff00
4 changed files with 27 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "node",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"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.",
|
||||
|
|
|
@ -83,8 +83,10 @@ export DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
. /etc/os-release
|
||||
if [[ "bionic" = *"${VERSION_CODENAME}"* ]]; then
|
||||
echo "(!) Unsupported distribution version '${VERSION_CODENAME}'. Details: https://github.com/nodejs/node/issues/42351#issuecomment-1068424442"
|
||||
exit 1
|
||||
if [[ "${NODE_VERSION}" =~ "18" ]] || [[ "${NODE_VERSION}" = "lts" ]]; then
|
||||
echo "(!) Unsupported distribution version '${VERSION_CODENAME}' for Node 18. Details: https://github.com/nodejs/node/issues/42351#issuecomment-1068424442"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
|
|
13
test/node/install_node_16_on_bionic.sh
Executable file
13
test/node/install_node_16_on_bionic.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Optional: Import test library
|
||||
source dev-container-features-test-lib
|
||||
|
||||
# Definition specific tests
|
||||
check "version" bash -c "node --version | grep 16"
|
||||
check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10"
|
||||
|
||||
# Report result
|
||||
reportResults
|
|
@ -34,5 +34,13 @@
|
|||
"version": "19.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"install_node_16_on_bionic": {
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-18.04",
|
||||
"features": {
|
||||
"node": {
|
||||
"version": "16"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue