From 94da95c325c2a9cd1c23a026f21dab54e1c5a258 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 --- legacy/src/openai-auth.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legacy/src/openai-auth.ts b/legacy/src/openai-auth.ts index 542026c0..ed3bf416 100644 --- a/legacy/src/openai-auth.ts +++ b/legacy/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'