Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply RSTUDIO_PANDOC to packaging tasks, including R Markdown render #3856

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

jmcphers
Copy link
Collaborator

@jmcphers jmcphers commented Jul 3, 2024

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 jmcphers requested a review from juliasilge July 3, 2024 21:21
Copy link
Contributor

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized I couldn't try this out with just a dev build since that's not when the bundling happens 🙈 so I triggered a release build, nuked all my pandocies, and tested out the render command as well as rmarkdown::pandoc_available(). Looks good! 👍

We'll want to take a similar approach to #2723 for the R pkg testing command but we'll need a different approach for #3842.

@juliasilge juliasilge merged commit 82b335e into main Jul 8, 2024
6 checks passed
@juliasilge juliasilge deleted the bugfix/rmarkdown-pandoc branch July 8, 2024 21:49
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants