From 7ebd4533cc02e246a93fd99a3d0a6c5d125946ef Mon Sep 17 00:00:00 2001 From: kylon <3252255+kylon@users.noreply.github.com> Date: Sun, 11 Jun 2023 18:04:21 +0200 Subject: [PATCH] fix chrome exe path for macos and windows after puppeteer upgrade --- preload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 preload.js diff --git a/preload.js b/preload.js old mode 100644 new mode 100755 index 6b6d38a..6467fea --- a/preload.js +++ b/preload.js @@ -139,9 +139,9 @@ const SharedownAPI = (() => { if (isLinux) return file === 'chrome-linux64'; else if (isMacOS) - return file === 'chrome-mac'; + return file === 'chrome-mac-x64'; else if (isWindows) - return file === 'chrome-win'; + return file === 'chrome-win64'; else return false; } @@ -164,7 +164,7 @@ const SharedownAPI = (() => { } try { - const chromeExe = isWindows ? 'chrome.exe' : (isMacOS ? 'Chromium.app/Contents/MacOS/Chromium' : 'chrome'); + const chromeExe = isWindows ? 'chrome.exe' : (isMacOS ? 'Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing' : 'chrome'); const osFold = (_fs.readdirSync(chromeDirPath).filter(file => _getChromeOSFolder(file)))[0]; const osExeFold = (_fs.readdirSync(_path.join(chromeDirPath, osFold)).filter(file => _getChromeOSExeFolder(file)))[0];