Skip to content

Commit ec309f7

Browse files
committed
Install yarn in tidy dockerfile
1 parent d7a9c6d commit ec309f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ci/docker/scripts/nodejs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
set -ex
44

55
NODEJS_VERSION=v20.12.2
6+
YARN_VERSION=1.22.22
67
INSTALL_PATH=${1:-/node}
78

89
url="https://nodejs.org/dist/${NODEJS_VERSION}/node-${NODEJS_VERSION}-linux-x64.tar.xz"
910
curl -sL "$url" | tar -xJ
1011
mv node-${NODEJS_VERSION}-linux-x64 "${INSTALL_PATH}"
12+
13+
# now, install yarn.
14+
# we call npm through the node binary, because otherwise npm will expect node to be in the PATH
15+
"${INSTALL_PATH}/bin/node" "${INSTALL_PATH}/bin/npm" install --global yarn@${YARN_VERSION}

0 commit comments

Comments
 (0)