()
| 37 | * @returns {Promise<string>} |
| 38 | */ |
| 39 | export async function getChromePath() { |
| 40 | if (process.platform === 'darwin') { |
| 41 | return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; |
| 42 | } |
| 43 | if (process.platform === 'win32') { |
| 44 | return winProgramFiles('Google\\Chrome\\Application\\chrome.exe'); |
| 45 | } |
| 46 | const possibleLinuxPaths = ['google-chrome', 'google-chrome-stable', 'chromium']; |
| 47 | for (const possiblePath of possibleLinuxPaths) { |
| 48 | try { |
| 49 | return await linuxAppPath(possiblePath); |
| 50 | } catch (e) { |
| 51 | // ignore |
| 52 | } |
| 53 | } |
| 54 | throw new Error('Could not find Chrome'); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @returns {Promise<string>} |
no test coverage detected
searching dependent graphs…