quarto-dev / quarto-dev/quarto-cli

Setting a environment variable during pre-render step terminates the preview

Open
#9,199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement projects
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Found while looking at https://github.com/quarto-dev/quarto-cli/discussions/9195

Quarto 1.5 now reload the project context after pre-rendering step. This means tweaking _environment and profile variations works from a pre-render script.

This is a repo example around this https://github.com/cderv/quarto-env-var-reprex (forked from #9195 example so that it is still there in case of removal)

❯ quarto preview
Preparing to preview
pre-process.R
++ Activating rlang global_entrace



environment variables changed: preview terminating

Should we handle this specific case ? Maybe starting the preview server after pre-rendering step upon latest project context rendering ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with quarto preview and the linked quarto-env-var-reprex, focusing on the pre-render script and the preview startup flow. Done means changing _environment or profile variables during pre-render no longer terminates the preview, or the intended behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, powershell, r
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.