Skip to content

Commit

Permalink
Run during build; not check. Use simpler rlang technique
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jan 23, 2025
1 parent 675932c commit 36df7f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/output.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ process_file = function(text, output) {
if (progress && is.function(pb$interrupt)) pb$interrupt()

if (xfun::pkg_available('rlang', '1.0.0')) {
if (Sys.getenv("_R_CHECK_LICENSE_") == "") {
if (Sys.getenv("R_BUILD_TEMPLIB") != "") {
cnd <- tryCatch(rlang::entrace(e), error = identity)
extra <<- paste(capture.output(print(cnd)), "\n", collapse = "")
extra <<- paste(format(cnd), "\n", collapse = "")
} else {
rlang::entrace(e)
}
Expand All @@ -333,7 +333,7 @@ process_file = function(text, output) {

message <- paste0('\nQuitting from lines ', loc)
if (!is.null(extra)) {
message <- paste0(message, "\n", rule(), extra, rule())
message <- paste0(message, "\n", rule(), extra, "\n", rule())
}
},
if (labels[i] != '') sprintf(' [%s]', labels[i]),
Expand Down

0 comments on commit 36df7f0

Please sign in to comment.