This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Description
We run nvm install
to check what the latest matching Node.js version is (e.g. NODE_VERSION
12
would match 12.18.3
), and download it unless it is available locally:
|
if nvm install --no-progress $NODE_VERSION |
Even if the desired Node.js version is already available locally, we still need to use nvm install
(and make an HTTP request) to check whether a newer matching Node.js version is available. However, if the command fails because nodejs.org
is down, we should default to using a local Node.js version instead, providing it matches the desired Node.js version. At the moment, we fail instead, which created an outage on 2020-08-30.
|
echo "Failed to install node version '$NODE_VERSION'" |