positron icon indicating copy to clipboard operation
positron copied to clipboard

Supply RSTUDIO_PANDOC to packaging tasks, including R Markdown render

Open jmcphers opened this issue 1 year ago • 0 comments

Several beta users have already reported trouble rendering documents with Positron because the render tasks can't find Pandoc, even though it ships with Positron.

This change supplies theRSTUDIO_PANDOC environment variable when running packaging tasks and R Markdown rendering jobs. It's done using the same logic we use to supply RSTUDIO_PANDOC to the main R session.

Addresses #3776.

QA Notes

The embedded Pandoc is only used when there's no other Pandoc on the $PATH. To test this, uninstall all your Pandocies (make sure which pandoc returns nothing) first so that only the bundled Pandoc is available.

This also touches the code that injects Pandoc into the main R session, so make sure e.g. rmarkdown::pandoc_version() still works there.

jmcphers avatar Jul 03 '24 21:07 jmcphers