From f5ae39afa18eeff3b687da9951724ac6ab231b12 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 5 Jan 2023 13:15:37 +0000 Subject: [PATCH] index: redo browser finding logging --- src/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index a7a43e8..59d3373 100644 --- a/src/index.js +++ b/src/index.js @@ -117,7 +117,7 @@ const exists = async path => { const getBrowserPath = async browser => { for (const path of Array.isArray(browserPaths[browser]) ? browserPaths[browser] : [ browserPaths[browser] ]) { - log('checking if ' + browser + ' exists:', path, await exists(path)); + // log('checking if ' + browser + ' exists:', path, await exists(path)); if (await exists(path)) return path; } @@ -158,12 +158,15 @@ const startBrowser = async (url, { windowSize, forceBrowser }) => { const browserFriendlyName = getFriendlyName(browserName); - log('browser path:', browserPath); - log('data path:', dataPath); + // log('browser path:', browserPath); + // log('data path:', dataPath); if (!browserPath) return log('failed to find a good browser install'); const browserType = getBrowserType(browserName); + log('found browser', browserName, `(${browserType} based)`, 'at path:', browserPath); + log('data path:', dataPath); + const Window = await (browserType === 'firefox' ? Firefox : Chromium)({ browserName: browserFriendlyName, dataPath,