index: redo browser finding logging

This commit is contained in:
Oj 2023-01-05 13:15:37 +00:00
parent 3a340c3f20
commit f5ae39afa1

View File

@ -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,