diff --git a/news/changelog-1.2.md b/news/changelog-1.2.md index f3dc4085f79..bb6e7e32c3e 100644 --- a/news/changelog-1.2.md +++ b/news/changelog-1.2.md @@ -1,6 +1,9 @@ ## New In This Patch Release - Fixes an issue using Quarto with the most recent version of jupyter_client (version 8.0.0 and later) +- Fix QUARTO_PANDOC variable not being respected in update-pandoc process. This + would cause errors where pandoc is not bundled with Quarto, such as in the +conda package. ## Fixed In Previous Patch Releases diff --git a/package/src/common/update-pandoc.ts b/package/src/common/update-pandoc.ts index 75a0fbf436c..da96608ff65 100644 --- a/package/src/common/update-pandoc.ts +++ b/package/src/common/update-pandoc.ts @@ -102,8 +102,10 @@ async function writePandocTemplates(config: Configuration) { } async function readTemplate(format: string, bin: string): Promise { + const pandoc = Deno.env.get("QUARTO_PANDOC") || + join(bin, "tools", "pandoc"); const result = await execProcess({ - cmd: [join(bin, "tools", "pandoc"), "--print-default-template", format], + cmd: [pandoc, "--print-default-template", format], stdout: "piped", stderr: "piped", });