Skip to content

setup: add GSTACK_SKIP_PLAYWRIGHT to skip Chromium install #913

@sun617

Description

@sun617

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.

 # 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions