Skip to content

Commit feb6fc8

Browse files
committed
chore: fallback if curl call fails
1 parent 3c44e68 commit feb6fc8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.evergreen/evergreen.yml.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ functions:
329329
script: |
330330
set -e
331331
{
332-
# Fetch Node.js version from VS Code's .nvmrc to ensure we test with the same version
333-
NODE_JS_VERSION=$(curl -fsSL https://raw.githubusercontent.com/microsoft/vscode/refs/heads/main/.nvmrc | tr -d '[:space:]')
334-
echo "Using Node.js version from VS Code .nvmrc: ${NODE_JS_VERSION}"
332+
# Fetch Node.js version from VS Code's .nvmrc, default to 22.20.0 if unavailable
333+
NODE_JS_VERSION=$(curl -fsSL https://raw.githubusercontent.com/microsoft/vscode/refs/heads/main/.nvmrc | tr -d '[:space:]' || echo "22.20.0")
334+
echo "Using Node.js version for VS Code extension tests: ${NODE_JS_VERSION}"
335335
(cd scripts/docker && docker build --build-arg NODE_JS_VERSION="${NODE_JS_VERSION}" -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
336336
docker run \
337337
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \

scripts/docker/ubuntu24.04-xvfb.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM ubuntu:24.04
22

33
ARG NODE_JS_VERSION
4+
5+
RUN if [ -z "$NODE_JS_VERSION" ]; then echo "Error: NODE_JS_VERSION is not defined"; exit 1; fi
6+
47
ENV NODE_JS_VERSION=${NODE_JS_VERSION}
58
ENV DEBIAN_FRONTEND=noninteractive
69
RUN apt-get update

0 commit comments

Comments
 (0)