Skip to content

Commit 9f322ff

Browse files
fix: update electron installation method to handle extraction issues on Node >= 26.1.0
1 parent b687863 commit 9f322ff

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/automated-tests.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,16 @@ jobs:
6161
npx playwright install --with-deps chromium
6262
- name: "Prepare environment for tests"
6363
run: |
64-
# Download electron binary
65-
npx install-electron
64+
# On Node >= 26.1.0, extract-zip fails to fully extract the electron binary
65+
# (see https://github.com/max-mapper/extract-zip/issues/154). Workaround:
66+
# download and extract electron manually using the system unzip.
67+
# TODO: simplify this once resolved upstream - e.g. via a fix in extract-zip
68+
# (currently unmaintained) or by electron replacing extract-zip with an alternative.
69+
ELECTRON_VERSION=$(node -e "console.log(require('./node_modules/electron/package.json').version)")
70+
rm -rf node_modules/electron/dist
71+
curl -sSL "https://github.com/electron/electron/releases/download/v${ELECTRON_VERSION}/electron-v${ELECTRON_VERSION}-linux-x64.zip" -o /tmp/electron.zip
72+
unzip -q /tmp/electron.zip -d node_modules/electron/dist
73+
echo -n "electron" > node_modules/electron/path.txt
6674
# Start labwc
6775
WLR_BACKENDS=headless WLR_LIBINPUT_NO_DEVICES=1 WLR_RENDERER=pixman labwc &
6876
touch config/custom.css

0 commit comments

Comments
 (0)