Skip to content

Use playwright install-deps to avoid fragile output parsing#198

Closed
djbender wants to merge 1 commit into
mainfrom
fix/playwright-install-deps
Closed

Use playwright install-deps to avoid fragile output parsing#198
djbender wants to merge 1 commit into
mainfrom
fix/playwright-install-deps

Conversation

@djbender
Copy link
Copy Markdown
Owner

Summary

  • Replace fragile npx playwright install --dry-run output parsing with the documented playwright install-deps subcommand
  • Unblocks Bump playwright from 1.59.1 to 1.60.0 #195 (Playwright 1.60.0 bump) — the 1.60.0 release reformatted dry-run output so the extracted command contains an unescaped (, causing sh: 1: Syntax error: "(" unexpected in the CI Test job

Root cause

The previous step did:

PLAYWRIGHT_INSTALL_CMD=\$(npx playwright install --dry-run --with-deps chromium | head -1 | sed ...)
sudo sh -c "\$PLAYWRIGHT_INSTALL_CMD"

This scrapes a non-contract output line. Playwright 1.60.0 changed that line so the extracted string includes characters that don't parse in plain sh. playwright install-deps is the documented CLI for "install system packages but not browsers" — exactly what this step needs, since the next step uses an actions/cache for the browser binaries.

Test plan

The previous step parsed `npx playwright install --dry-run --with-deps`
output to extract a sudo command. Playwright 1.60.0 changed that output
so the extracted string contains an unescaped `(` and breaks `sh`,
blocking the playwright bump in #195. Use the documented
`playwright install-deps` subcommand instead -- it installs only the
system packages (browsers come from the cache step below).
@djbender
Copy link
Copy Markdown
Owner Author

Superseded — the same workflow fix has been pushed directly onto #195's branch so the playwright bump can land in one PR.

@djbender djbender closed this May 14, 2026
@djbender djbender deleted the fix/playwright-install-deps branch May 14, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant