Skip to content

Commit 513f371

Browse files
committed
cri - Allow to specify a chrome to use with Quarto using an env var QUARTO_CHROMIUM
closes #10170
1 parent f0403e1 commit 513f371

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/puppeteer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ export async function withHeadlessBrowser<T>(
201201

202202
async function findChrome(): Promise<string | undefined> {
203203
let path;
204+
// First check env var and use this path if specified
205+
const envPath = Deno.env.get("QUARTO_CHROMIUM");
206+
if (envPath && safeExistsSync(envPath)) {
207+
return envPath;
208+
}
209+
// Otherwise, try to find the path based on OS.
204210
if (Deno.build.os === "darwin") {
205211
const programs = [
206212
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",

0 commit comments

Comments
 (0)