Ensure Node 20 for DBIS deploy
This commit is contained in:
@@ -125,9 +125,11 @@ if ! command -v curl >/dev/null 2>&1; then
|
||||
apt-get install -y -qq curl ca-certificates
|
||||
fi
|
||||
|
||||
if ! command -v node >/dev/null 2>&1; then
|
||||
NODE_MAJOR="\$(node -p 'process.versions.node.split(\".\")[0]' 2>/dev/null || echo 0)"
|
||||
if [ "\$NODE_MAJOR" -lt 20 ]; then
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
hash -r
|
||||
fi
|
||||
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:\$PATH"
|
||||
|
||||
Reference in New Issue
Block a user