From 0e513f4d0859decc4a192514bcac7b3dc5c08ace Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 11 Mar 2023 17:23:12 -0800 Subject: [PATCH] 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. --- scripts/install-node | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install-node b/scripts/install-node index 24be9f5..cf6122d 100755 --- a/scripts/install-node +++ b/scripts/install-node @@ -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")