MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / resolve_chrome

Function resolve_chrome

cli/src/engine.rs:134–145  ·  view source on GitHub ↗

Prefer env override, then any Chrome on PATH, then a Playwright-cached Chromium.

()

Source from the content-addressed store, hash-verified

132
133/// Prefer env override, then any Chrome on PATH, then a Playwright-cached Chromium.
134fn resolve_chrome() -> Result<PathBuf> {
135 if let Some(p) = std::env::var_os("EDGE_CHROME_PATH") {
136 return Ok(PathBuf::from(p));
137 }
138 if let Ok(p) = headless_chrome::browser::default_executable() {
139 return Ok(p);
140 }
141 if let Some(p) = playwright_chrome() {
142 return Ok(p);
143 }
144 bail!("no Chrome/Chromium found; re-run install.sh or set EDGE_CHROME_PATH");
145}
146
147/// Best-effort lookup of a Playwright-installed Chromium under `~/.cache/ms-playwright/chromium-*/chrome-linux/chrome`.
148fn playwright_chrome() -> Option<PathBuf> {

Callers 1

launchFunction · 0.85

Calls 1

playwright_chromeFunction · 0.85

Tested by

no test coverage detected