setup: add GSTACK_SKIP_PLAYWRIGHT to skip Chromium install
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
## Problem
On NixOS (and other non-FHS distros), `./setup` fails at the Playwright Chromium check because the downloaded binary can't find system libraries like `libglib-2.0.so.0`:
```
error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file
gstack setup failed: Playwright Chromium could not be launched
```
Users on these systems typically have a system-installed Chrome/Chromium that works fine.
## Proposed fix
Add a `GSTACK_SKIP_PLAYWRIGHT=1` env var check that skips the Playwright browser install/verification. The browse tool already supports `GSTACK_CHROMIUM_PATH` to point at a system browser, so setup just needs to get out of the way.
```diff
# 2. Ensure Playwright's Chromium is available
-if ! ensure_playwright_browser; then
+# Skip with GSTACK_SKIP_PLAYWRIGHT=1 if using a system-installed Chrome/Chromium
+# (set GSTACK_CHROMIUM_PATH to point the browse tool at your system browser)
+if [ "${GSTACK_SKIP_PLAYWRIGHT:-0}" = "1" ]; then
+ log "Skipping Playwright browser check (GSTACK_SKIP_PLAYWRIGHT=1)"
+elif ! ensure_playwright_browser; then
```
Usage: `GSTACK_SKIP_PLAYWRIGHT=1 ./setup`
## Workaround
Until this is merged, users can patch `setup` locally or auto-detect a system Chrome before the Playwright check.
Contributor guide
Assessment
This issue has not been assessed yet.