Skip to content

Add bb setup browser flow#79

Open
shuyhere wants to merge 1 commit intomasterfrom
feat/setup-browser-cli
Open

Add bb setup browser flow#79
shuyhere wants to merge 1 commit intomasterfrom
feat/setup-browser-cli

Conversation

@shuyhere
Copy link
Copy Markdown
Owner

Fixes #78

Summary

  • add a first-class bb setup browser command
  • detect whether a compatible local Chrome / Chromium / Edge executable is available
  • print the current-shell BB_BROWSER export and optionally persist it to the user's shell rc file
  • reuse browser_fetch detection logic from bb-tools
  • document the new setup flow in the README and tool docs

Why

We considered making browser installation/configuration happen implicitly during every npm install, but that is too heavy and surprising for a large optional runtime dependency.

An explicit setup flow is safer and clearer:

  • it tells the user whether browser_fetch can work on this machine
  • it shows how to configure BB_BROWSER
  • it can persist that config for future shells
  • it gives platform-specific install guidance when no browser is found

Command examples

bb setup browser
bb setup browser --persist

Testing

  • cargo test -p bb-cli setup -- --nocapture
  • cargo test -p bb-tools browser_fetch -- --nocapture
  • cargo run -q -p bb-cli -- setup browser --help
  • cargo run -q -p bb-cli -- setup browser

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.

Add explicit bb setup browser flow for browser_fetch dependencies

1 participant