kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: respect PUPPETEER_EXECUTABLE_PATH
rodzic
e144d78e7d
commit
39518ac691
|
@ -360,6 +360,10 @@ export async function getBrowser(
|
||||||
* Gets the default path to chrome's executable for the current platform.
|
* Gets the default path to chrome's executable for the current platform.
|
||||||
*/
|
*/
|
||||||
export const defaultChromeExecutablePath = (): string => {
|
export const defaultChromeExecutablePath = (): string => {
|
||||||
|
if (process.env.PUPPETEER_EXECUTABLE_PATH) {
|
||||||
|
return process.env.PUPPETEER_EXECUTABLE_PATH
|
||||||
|
}
|
||||||
|
|
||||||
switch (os.platform()) {
|
switch (os.platform()) {
|
||||||
case 'win32':
|
case 'win32':
|
||||||
return 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'
|
return 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'
|
||||||
|
|
Ładowanie…
Reference in New Issue