You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The env shortcode does not allow a fallback value.
In R, we might:
Sys.getenv("FRUIT", "apples")
In Python, we might:
os.environ.get("FRUIT", "apples")
In simple Quarto documents (using the Markdown engine), we do not have either of these options. If the document were accompanied by a _quarto.yml file (and seen as a "project"), that document could use an _environment file to provide default environment values. The _environment file is only processed for projects, not standalone documents.
Proposal: Extend the env shortcode to allow a fallback value.
Discussed in #8315
Originally posted by aronatkins January 17, 2024
Description
The
env
shortcode does not allow a fallback value.In R, we might:
In Python, we might:
In simple Quarto documents (using the Markdown engine), we do not have either of these options. If the document were accompanied by a
_quarto.yml
file (and seen as a "project"), that document could use an_environment
file to provide default environment values. The_environment
file is only processed for projects, not standalone documents.Proposal: Extend the
env
shortcode to allow a fallback value.The text was updated successfully, but these errors were encountered: