Skip to content

Commit

Permalink
fix chrome exe path for macos and windows after puppeteer upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
kylon committed Jun 11, 2023
1 parent 23dd720 commit 7ebd453
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions preload.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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];

Expand Down

0 comments on commit 7ebd453

Please sign in to comment.