Fix Danger job failing due to missing NODE_INSTALL_VERSION

https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/651
removed the argument handling in `scripts/install-node`, but this
led to a build failure in https://gitlab.com/gitlab-org/gitlab-build-images/-/jobs/3916618504
since `NODE_INSTALL_VERSION` is not always exported. We restore
the parsing of the arguments, but leave out the default values.
This commit is contained in:
Stan Hu 2023-03-11 17:23:12 -08:00
parent 6cb9ebafe9
commit 0e513f4d08
No known key found for this signature in database
GPG key ID: 8D3931AD39CC7A20

View file

@ -2,6 +2,9 @@
set -xeuo pipefail
IFS=$'\n\t'
NODE_INSTALL_VERSION=${1}
YARN_INSTALL_VERSION=${2}
# Map MAJOR.MINOR.patch -> MAJOR.x
NODE_MAJOR=$(echo "$NODE_INSTALL_VERSION" | sed -r -e "s/([0-9]+)\.[0-9]+.*/\1\.x/g")