Skip to content

Commit 4a79425

Browse files
mydeaclaude
andcommitted
fix(ci): Pass PLAYWRIGHT_BROWSERS_PATH through sudo
sudo resets environment variables by default, so the ENV set in the Dockerfile wasn't visible to the npx playwright install command. Explicitly pass the variable so browsers are installed to /opt/pw-browsers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c5b1b0d commit 4a79425

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/docker/playwright.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN sudo curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION%%.*}.x | sud
2424
# (GHA sets HOME=/github/home inside containers, not /home/runner).
2525
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/pw-browsers
2626
RUN sudo mkdir -p /opt/pw-browsers && \
27-
sudo npx playwright@${PLAYWRIGHT_VERSION} install chromium webkit firefox --with-deps
27+
sudo PLAYWRIGHT_BROWSERS_PATH=/opt/pw-browsers npx playwright@${PLAYWRIGHT_VERSION} install chromium webkit firefox --with-deps
2828

2929
# Mark GitHub Actions workspace as safe for git (system-wide config so it
3030
# works regardless of HOME, which GHA overrides to /github/home).

0 commit comments

Comments
 (0)