Honor GSTACK_CHROMIUM_PATH on the headless launch and setup paths#1633
Honor GSTACK_CHROMIUM_PATH on the headless launch and setup paths#1633ryanlaiwy wants to merge 1 commit into
Conversation
The headed path (launchPersistentContext) already passes executablePath from GSTACK_CHROMIUM_PATH, but the headless chromium.launch() ignored it, so a custom Chromium was used in headed mode only. setup's ensure_playwright_browser self-test had the same gap — it always launched Playwright's bundled Chromium. On NixOS the bundled chrome-headless-shell can't run (it expects /lib64/ld-linux-x86-64.so.2, absent on a Nix filesystem), so ./setup bails before registering sub-skills and headless browsing fails even when GSTACK_CHROMIUM_PATH points at a working system Chromium. Pass executablePath on the headless launch, and teach ensure_playwright_browser to use the same binary. No-op when the env var is unset — zero impact on normal installs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The setup self-test half looks useful, but the Right now this adds Can this either rebase/port #1614's |
Problem
GSTACK_CHROMIUM_PATHlets you point gstack at a custom Chromium binary. The headed path (launchPersistentContext) already honors it, but two paths ignored it:BrowserManager's headlesschromium.launch()— a custom binary was used in headed mode only.setup'sensure_playwright_browserself-test — always launched Playwright's bundled Chromium.On NixOS the bundled
chrome-headless-shellcan't run (it expects/lib64/ld-linux-x86-64.so.2, absent on a Nix filesystem), so./setupbails before registering sub-skills and headlessbrowsefails — even withGSTACK_CHROMIUM_PATHset to a working system Chromium.Change
executablePathon the headlesschromium.launch()whenGSTACK_CHROMIUM_PATHis set.ensure_playwright_browserverifies that same binary (with--no-sandbox) when the env var is set.Both are no-ops when
GSTACK_CHROMIUM_PATHis unset — zero impact on normal installs.Testing
Verified on a NixOS-style container (Replit): with
GSTACK_CHROMIUM_PATHpointed at the system Chromium,./setupcompletes and registers all sub-skills, and headlessbrowsenavigates and screenshots correctly. Without the env var, behavior is unchanged.🤖 Generated with Claude Code