Skip to content

Commit

Permalink
fix #1210
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 23, 2024
1 parent 4fcedb2 commit 5aa33e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/utils_callr.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ callr_dispatch <- function(
store,
fun
) {
options <- list(crayon.enabled = interactive())
options <- list()
callr_arguments$func <- callr_inner
callr_arguments$args <- list(
targets_function = targets_function,
Expand Down
4 changes: 2 additions & 2 deletions R/utils_condition.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ tar_error <- function(message, class) {
on.exit(options(cli.num_colors = old_cli_number_ansi_colors))
options(cli.num_colors = cli_number_ansi_colors)
old <- options(rlang_backtrace_on_error = "none")
on.exit(options(old))
on.exit(options(old), add = TRUE)
message <- cli::col_red(message)
rlang::abort(message = message, class = class, call = tar_empty_envir)
}
Expand All @@ -126,7 +126,7 @@ tar_warning <- function(message, class) {
on.exit(options(cli.num_colors = old_cli_number_ansi_colors))
options(cli.num_colors = cli_number_ansi_colors)
old <- options(rlang_backtrace_on_error = "none")
on.exit(options(old))
on.exit(options(old), add = TRUE)
message <- cli::col_red(message)
rlang::warn(message = message, class = class)
}
Expand Down

0 comments on commit 5aa33e9

Please sign in to comment.