Skip to content

Commit c98bb99

Browse files
author
Adam Rutland
authored
Merge pull request #394 from jfgarcia268/master
Added Linux chrome path for LWC compilation
2 parents d7dabb7 + 4693d5e commit c98bb99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/utilityservice.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,8 @@ UtilityService.prototype.getPuppeteerOptions = async function (jobInfo) {
15141514
let macChrome = path.join('/', 'Applications', 'Google Chrome.app', 'Contents', 'MacOS', 'Google Chrome');
15151515
let winChrome = path.join('/', 'Program Files', 'Google', 'Chrome', 'Application', 'chrome.exe');
15161516
let winChrome86 = path.join('/', 'Program Files (x86)', 'Google', 'Chrome', 'Application', 'chrome.exe');
1517+
let linux = path.join('/','opt','google','chrome','chrome');
1518+
let linux2 = path.join('/','opt','google','chrome','google-chrome');
15171519

15181520
if (jobInfo.puppeteerExecutablePath) {
15191521
puppeteerOptions.executablePath = jobInfo.puppeteerExecutablePath;
@@ -1523,6 +1525,10 @@ UtilityService.prototype.getPuppeteerOptions = async function (jobInfo) {
15231525
puppeteerOptions.executablePath = winChrome;
15241526
} else if (fs.existsSync(winChrome86)) {
15251527
puppeteerOptions.executablePath = winChrome86;
1528+
} else if (fs.existsSync(linux)) {
1529+
puppeteerOptions.executablePath = linux;
1530+
} else if (fs.existsSync(linux2)) {
1531+
puppeteerOptions.executablePath = linux2;
15261532
} else {
15271533
let chromiumDirLocal = path.join('.', 'node_modules', 'puppeteer', '.local-chromium');
15281534
if (fs.existsSync(chromiumDirLocal)) {

0 commit comments

Comments
 (0)