MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / findBrowser

Function findBrowser

telemetry-dashboard/scripts/render-check.mjs:72–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72function findBrowser() {
73 const home = process.env.HOME ?? '';
74 const candidates = [
75 process.env.CHROME_BIN,
76 ...glob(`${home}/Library/Caches/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-mac-arm64/chrome-headless-shell`),
77 ...glob(`${home}/Library/Caches/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-mac-x64/chrome-headless-shell`),
78 ...glob(`${home}/.cache/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-linux/chrome-headless-shell`),
79 ...glob(`${home}/.cache/ms-playwright/chromium-*/chrome-linux/chrome`),
80 '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
81 '/Applications/Chromium.app/Contents/MacOS/Chromium',
82 '/usr/bin/chromium',
83 '/usr/bin/chromium-browser',
84 '/usr/bin/google-chrome',
85 ];
86 return candidates.find((path) => path && existsSync(path)) ?? null;
87}
88
89// ---------------------------------------------------------------------------
90// A minimal DevTools-protocol client

Callers 1

mainFunction · 0.85

Calls 1

globFunction · 0.85

Tested by

no test coverage detected