From 51b827c540a2162997942fb31ed9e018786fe3c7 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Tue, 13 Dec 2022 18:49:45 +0000 Subject: [PATCH] gluon: clean up browser paths --- gluon/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gluon/index.js b/gluon/index.js index c706400..899f29d 100644 --- a/gluon/index.js +++ b/gluon/index.js @@ -14,13 +14,13 @@ const __filename = fileURLToPath(import.meta.url); 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'), + win32: process.platform === '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'), - 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: { // these should be in path so just use the name of the binary