-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
r-lib/cli
#479Description
cli::cli_abort(.internal = TRUE) internal error messages always assume the error would be in the cli package, regardless of call. rlang::abort(.internal = TRUE) doesn't have this problem.
good <- function() rlang::abort("oops", call = rlang::caller_env(), .internal = TRUE)
bad <- function() cli::cli_abort("oops", call = rlang::caller_env(), .internal = TRUE)
good()
#> Error:
#> ! oops
#> ℹ This is an internal error, please report it to the package authors.
bad()
#> Error:
#> ! oops
#> ℹ This is an internal error in the cli package, please report it to the package
#> authors.Created on 2022-03-31 by the reprex package (v2.0.1)
I think the underlying issue is in rlang::abort():
Lines 300 to 307 in 9d8e74f
| message_info <- cnd_message_info( | |
| message, | |
| body, | |
| footer, | |
| caller, | |
| use_cli_format = use_cli_format, | |
| internal = .internal | |
| ) |
cnd_message_info(call = caller) but instead should be cnd_message_info(call = call) because caller <- caller_env().Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels