Skip to content

Commit

Permalink
fix #2271: use the normal progress bar by default when knitting takes…
Browse files Browse the repository at this point in the history
… place in RStudio's background jobs pane
  • Loading branch information
yihui committed Aug 23, 2023
1 parent 50e28da commit ca71727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

- Figure captions are no longer escaped for reStructuredText output, and the alt text can also be specified via the `fig.alt` chunk option now (thanks, @trevorld, #2023).

- Use the correct type of progress bar when rendering Quarto documents in RStudio, which takes place in RStudio's background jobs pane (thanks, @hadley, #2271).

# CHANGES IN knitr VERSION 1.43

## NEW FEATURES
Expand Down
2 changes: 2 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,8 @@ txt_pb = function(total, labels) {
if (identical(con, '')) con = stdout()
if (!inherits(con, 'connection')) return(TRUE)
if (isatty(con)) return(FALSE)
# RStudio's background jobs
if (Sys.getenv('RSTUDIO_CHILD_PROCESS_PANE') == 'job') return(FALSE)
# when RStudio is available, return FALSE
is.null(tryCatch(rstudioapi::versionInfo(), error = function(e) NULL))
})()
Expand Down

0 comments on commit ca71727

Please sign in to comment.