diff --git a/news/changelog-1.6.md b/news/changelog-1.6.md index 8c9a78b7b1b..501d8082033 100644 --- a/news/changelog-1.6.md +++ b/news/changelog-1.6.md @@ -3,3 +3,7 @@ All changes included in 1.6: ## `quarto inspect` - ([#10188](https://github.com/quarto-dev/quarto-cli/issues/10188)): `quarto inspect` properly resolves includes across subdirectory boundaries. + +## Other Fixes and Improvements + +- ([#10162](https://github.com/quarto-dev/quarto-cli/issues/10162)): Use Edge on `macOS` as a Chromium browser when available. diff --git a/src/core/puppeteer.ts b/src/core/puppeteer.ts index a25ece360ba..de201fe938d 100644 --- a/src/core/puppeteer.ts +++ b/src/core/puppeteer.ts @@ -5,7 +5,7 @@ */ import { readRegistryKey } from "./windows.ts"; -import { which } from "./path.ts"; +import { safeExistsSync, which } from "./path.ts"; import { error, info } from "../deno_ral/log.ts"; import { existsSync } from "fs/mod.ts"; import { UnreachableError } from "./lib/error.ts"; @@ -202,10 +202,13 @@ export async function withHeadlessBrowser( async function findChrome(): Promise { let path; if (Deno.build.os === "darwin") { - path = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; - if (!existsSync(path)) { - return undefined; - } + const programs = [ + "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", + "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge", + ]; + return programs.find((p) => { + safeExistsSync(p); + }); } else if (Deno.build.os === "windows") { // Try the HKLM key const programs = ["chrome.exe", "msedge.exe"];