feat: respect PUPPETEER_EXECUTABLE_PATH

pull/164/head
Travis Fischer 2022-12-18 04:07:24 -06:00
rodzic e144d78e7d
commit 39518ac691
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -360,6 +360,10 @@ export async function getBrowser(
* Gets the default path to chrome's executable for the current platform.
*/
export const defaultChromeExecutablePath = (): string => {
if (process.env.PUPPETEER_EXECUTABLE_PATH) {
return process.env.PUPPETEER_EXECUTABLE_PATH
}
switch (os.platform()) {
case 'win32':
return 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'