Skip to content

Commit f186a76

Browse files
Fix Node source mirror issue on CentOS distros
1 parent 7d263b8 commit f186a76

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/nodejs/main.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function main {
5757
if [[ "${PKG_DEBUG:-false}" == "false" ]]; then
5858
INSTALLER_CMD+=" --quiet --errorlevel=0"
5959
fi
60-
INSTALLER_CMD+=" install nodejs"
6160

6261
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
6362
;;
@@ -67,6 +66,12 @@ function main {
6766
curl -fsSL "$url" | sudo -E bash -
6867
fi
6968

69+
# TODO: Remove node source mirror workaround when works on CentOS distros
70+
if [ "${ID,,}" == "centos" ]; then
71+
curl -sL -o /tmp/nodejs.rpm "$(yumdownloader --urls nodejs -q)"
72+
INSTALLER_CMD+=" install /tmp/nodejs.rpm"
73+
fi
74+
7075
$INSTALLER_CMD
7176
rm -rf ~/.yarn/
7277
curl -o- -L https://yarnpkg.com/install.sh | bash

0 commit comments

Comments
 (0)