From 9c8d99d10d2bf9e0ab0ce396dd1aa708a5a766d0 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Tue, 13 Dec 2022 17:12:58 +0000 Subject: [PATCH] gluon: fix error making paths on linux --- gluon/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gluon/index.js b/gluon/index.js index e995111..c706400 100644 --- a/gluon/index.js +++ b/gluon/index.js @@ -15,15 +15,15 @@ const __dirname = dirname(__filename); const browserPaths = ({ win32: { - chrome_stable: join(process.env.PROGRAMFILES, 'Google', 'Chrome', 'Application', 'chrome.exe'), - chrome_canary: join(process.env.LOCALAPPDATA, 'Google', 'Chrome SxS', 'Application', 'chrome.exe'), - edge: join(process.env['PROGRAMFILES(x86)'], 'Microsoft', 'Edge', 'Application', 'msedge.exe'), + chrome_stable: join(process.env.PROGRAMFILES ?? '', 'Google', 'Chrome', 'Application', 'chrome.exe'), + chrome_canary: join(process.env.LOCALAPPDATA ?? '', 'Google', 'Chrome SxS', 'Application', 'chrome.exe'), + edge: join(process.env['PROGRAMFILES(x86)'] ?? '', 'Microsoft', 'Edge', 'Application', 'msedge.exe'), - firefox: join(process.env.PROGRAMFILES, 'Mozilla Firefox', 'firefox.exe'), - firefox_nightly: join(process.env.PROGRAMFILES, 'Firefox Nightly', 'firefox.exe'), + firefox: join(process.env.PROGRAMFILES ?? '', 'Mozilla Firefox', 'firefox.exe'), + firefox_nightly: join(process.env.PROGRAMFILES ?? '', 'Firefox Nightly', 'firefox.exe'), }, - linux: { + linux: { // these should be in path so just use the name of the binary chromium: 'chromium', firefox: 'firefox', }