Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: quarto
Title: R Interface to 'Quarto' Markdown Publishing System
Version: 1.4.4.9008
Version: 1.4.4.9009
Authors@R: c(
person("JJ", "Allaire", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-0174-9868")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# quarto (development version)

- `quarto_render()` now correctly set `as_job` when not inside RStudio IDE and required **rstudioapi** functions are not available (#203).

- Add several new wrapper function (thanks, @parmsam, #192):
- `quarto_list_extensions()` to list installed extensions using `quarto list extensions`
- `quarto_remove_extension()` to remove an installed extension using `quarto remove extensions`
Expand Down
7 changes: 6 additions & 1 deletion R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ quarto_render <- function(
}

# render as job if requested and running within rstudio
if (as_job && rstudioapi::isAvailable()) {
if (
as_job &&
rstudioapi::isAvailable() &&
rstudioapi::hasFun("jobRunScript") &&
in_rstudio()
) {
message(
"Rendering project as background job (use as_job = FALSE to override)"
)
Expand Down
8 changes: 8 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@
`%||%` <- function(x, y) {
if (is_null(x)) y else x
}

in_positron <- function() {
identical(Sys.getenv("POSITRON"), "1")

Check warning on line 30 in R/utils.R

View check run for this annotation

Codecov / codecov/patch

R/utils.R#L30

Added line #L30 was not covered by tests
}

in_rstudio <- function() {
identical(Sys.getenv("RSTUDIO"), "1")

Check warning on line 34 in R/utils.R

View check run for this annotation

Codecov / codecov/patch

R/utils.R#L34

Added line #L34 was not covered by tests
}