Skip to content

fix(cli): honor Chrome extra args on start#37

Open
anupamchugh wants to merge 1 commit into
obra:mainfrom
anupamchugh:fix-cli-chrome-extra-args
Open

fix(cli): honor Chrome extra args on start#37
anupamchugh wants to merge 1 commit into
obra:mainfrom
anupamchugh:fix-cli-chrome-extra-args

Conversation

@anupamchugh

Copy link
Copy Markdown

Fixes #35.

Problem

chrome-ws start built its Chrome launch args inline, so it ignored the documented CHROME_EXTRA_ARGS environment variable. That meant headless/root Linux users could not pass flags such as --headless=new or --disable-gpu through the CLI start path, even though the MCP/library launch path already honored those flags.

Change

  • Reuse the existing buildChromeArgs() helper in chrome-ws start.
  • Keep CLI start headed by default with chromeHeadless: false.
  • Add a CLI regression test that launches a fake browser binary and inspects the actual argv passed to the child process.

Verification

  • Red check: temporarily restored the old inline-args path; the new CLI regression test failed because the shared-helper/env flags were absent.
  • node --test test/cli-dispatch.test.mjs passed: 5/5.
  • npm test passed: lint clean, bundle fresh, 435/435 tests passing.

Review

Anupam Chugh reviewed the complete diff in chat before submission. The diff is scoped to two files and does not add dependencies or unrelated refactors.

Notes

This repo currently has main as its default branch and no remote dev branch, so this PR targets main.

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.

chrome-ws start silently fails on headless Linux as root; misleading error + CHROME_EXTRA_ARGS not honored in CLI path

1 participant