Skip to content

Commit

Permalink
revise c1c9a57 and ca71727: just don't use simple progress bars in RS…
Browse files Browse the repository at this point in the history
…tudio, no matter where they are

e.g., this will also work for "Compile PDF" for Rnw documents
  • Loading branch information
yihui committed Oct 9, 2023
1 parent 8e0341c commit 7e00867
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,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') %in% c('job', 'build')) return(FALSE)
# when RStudio is available, return FALSE
is.null(tryCatch(rstudioapi::versionInfo(), error = function(e) NULL))
# when in RStudio, return FALSE
Sys.getenv('RSTUDIO') != '1'
})()
# use simple progress output without the bar but only progress and labels
if (simple) return(list(
Expand Down

0 comments on commit 7e00867

Please sign in to comment.