From 39518ac69141361cb5c82ef7533c6b9df119dd2e Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Sun, 18 Dec 2022 04:07:24 -0600 Subject: [PATCH] feat: respect PUPPETEER_EXECUTABLE_PATH --- src/openai-auth.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openai-auth.ts b/src/openai-auth.ts index 542026c..ed3bf41 100644 --- a/src/openai-auth.ts +++ b/src/openai-auth.ts @@ -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'