diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2022-11-16 01:51:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 01:51:00 +0300 |
commit | 1e35500bda4b00fadc1b2881865ad3cffaa69ff8 (patch) | |
tree | 4c1ac0b61f6bef5999c97084352031a61eef8e7c /src/node/install.sh | |
parent | f9acb6aae1e520b0b61aaac9ab4ecb00dd497451 (diff) |
Node: Fix bug - version set by Feature is not default (#294)
* Node:Fix bug version set by Feature is not default
* node not supported for ubuntu:bionic
Diffstat (limited to 'src/node/install.sh')
-rwxr-xr-x | src/node/install.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/node/install.sh b/src/node/install.sh index f51306e..2f2e7aa 100755 --- a/src/node/install.sh +++ b/src/node/install.sh @@ -81,6 +81,12 @@ check_packages() { # Ensure apt is in non-interactive to avoid prompts 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 +fi + # Install dependencies check_packages apt-transport-https curl ca-certificates tar gnupg2 dirmngr @@ -152,7 +158,7 @@ if [ ! -d "${NVM_DIR}" ]; then else echo "NVM already installed." if [ "${NODE_VERSION}" != "" ]; then - su ${USERNAME} -c "umask 0002 && . $NVM_DIR/nvm.sh && nvm install ${NODE_VERSION}" + su ${USERNAME} -c "umask 0002 && . $NVM_DIR/nvm.sh && nvm install ${NODE_VERSION} && nvm alias default ${NODE_VERSION}" fi fi |