MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / findChromePath

Function findChromePath

tooling/scripts/perf-web-runtime.mjs:278–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276}
277
278function findChromePath() {
279 const candidates = [
280 process.env.CHROME_PATH,
281 process.platform === 'darwin' ? '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' : null,
282 process.platform === 'darwin' ? '/Applications/Chromium.app/Contents/MacOS/Chromium' : null,
283 process.platform === 'win32'
284 ? 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'
285 : null,
286 process.platform === 'win32'
287 ? 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'
288 : null,
289 'google-chrome',
290 'chromium',
291 'chromium-browser'
292 ].filter(Boolean)
293
294 return candidates[0]
295}
296
297function startChrome({ debugPort, userDataDir }) {
298 const chromePath = findChromePath()

Callers 1

startChromeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected