Skip to content

Commit

Permalink
feat: respect PUPPETEER_EXECUTABLE_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Dec 18, 2022
1 parent e144d78 commit 39518ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/openai-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 39518ac

Please sign in to comment.