Skip to content

Commit

Permalink
Merge pull request #394 from jfgarcia268/master
Browse files Browse the repository at this point in the history
Added Linux chrome path for  LWC compilation
  • Loading branch information
Adam Rutland authored Aug 10, 2021
2 parents d7dabb7 + 4693d5e commit c98bb99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/utilityservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,8 @@ UtilityService.prototype.getPuppeteerOptions = async function (jobInfo) {
let macChrome = path.join('/', 'Applications', 'Google Chrome.app', 'Contents', 'MacOS', 'Google Chrome');
let winChrome = path.join('/', 'Program Files', 'Google', 'Chrome', 'Application', 'chrome.exe');
let winChrome86 = path.join('/', 'Program Files (x86)', 'Google', 'Chrome', 'Application', 'chrome.exe');
let linux = path.join('/','opt','google','chrome','chrome');
let linux2 = path.join('/','opt','google','chrome','google-chrome');

if (jobInfo.puppeteerExecutablePath) {
puppeteerOptions.executablePath = jobInfo.puppeteerExecutablePath;
Expand All @@ -1523,6 +1525,10 @@ UtilityService.prototype.getPuppeteerOptions = async function (jobInfo) {
puppeteerOptions.executablePath = winChrome;
} else if (fs.existsSync(winChrome86)) {
puppeteerOptions.executablePath = winChrome86;
} else if (fs.existsSync(linux)) {
puppeteerOptions.executablePath = linux;
} else if (fs.existsSync(linux2)) {
puppeteerOptions.executablePath = linux2;
} else {
let chromiumDirLocal = path.join('.', 'node_modules', 'puppeteer', '.local-chromium');
if (fs.existsSync(chromiumDirLocal)) {
Expand Down

0 comments on commit c98bb99

Please sign in to comment.