Skip to content

shiny_prerendered documents execute in wrong environment #1124

@wch

Description

@wch

For example, this document will read args and output_file from the environment created by shiny_prerendered_html()'s invocation.

---
title: "Untitled"
output: html_document
runtime: shiny_prerendered

---

```{r}
args
output_file
```

The result looks like this:

image

The culprit is this new.env():
https://github.com/rstudio/rmarkdown/blob/6def14c/R/shiny_prerendered.R#L125

Perhaps it should have parent=globalenv()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions