Skip to content

Commit 7eb96c4

Browse files
committed
Make CHROME_PATH warning silent if used Edge
1 parent 75ffc5e commit 7eb96c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/puppeteer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ export const generatePuppeteerLaunchArgs = () => {
4242

4343
// Resolve Chrome path to execute
4444
if (executablePath === false) {
45+
let findChromeError: Error | undefined
46+
4547
if (process.env.IS_DOCKER) {
4648
// Use already known path within Marp CLI official Docker image
4749
executablePath = '/usr/bin/chromium-browser'
4850
} else {
4951
try {
5052
executablePath = findChromeInstallation()
5153
} catch (e) {
52-
if (e instanceof Error) warn(e.message)
54+
if (e instanceof Error) findChromeError = e
5355
}
5456
}
5557

@@ -58,6 +60,8 @@ export const generatePuppeteerLaunchArgs = () => {
5860
executablePath = findEdgeInstallation()
5961

6062
if (!executablePath) {
63+
if (findChromeError) warn(findChromeError.message)
64+
6165
error(
6266
'You have to install Google Chrome, Chromium, or Microsoft Edge to convert slide deck with current options.',
6367
CLIErrorCode.NOT_FOUND_CHROMIUM

0 commit comments

Comments
 (0)