Skip to content

Commit

Permalink
transition rlang::warn() -> cli::cli_warn()
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Oct 23, 2024
1 parent 9a6f9b8 commit 27416c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dplyr::`%>%`
#' @importFrom cli cli_inform
#' @importFrom cli cli_warn
#' @importFrom cli cli_abort
#' @importFrom cli qty
#' @importFrom rlang caller_env %||%
#' @import workflows

Expand Down Expand Up @@ -76,9 +77,10 @@ check_empty_ellipses <- function(...) {
) %>%
unlist()

msg <- "The `...` are not used in this function but one or more arguments were passed: "
msg <- paste0(msg, paste0("'", names(dots), "'", collapse = ", "))
rlang::warn(msg)
cli_warn(
"The `...` are not used in this function but {?an/}{qty(length(dots))}
argument{?s} {.arg {names(dots)}} {?was/were} passed."
)
}
invisible(NULL)
}
Expand Down

0 comments on commit 27416c8

Please sign in to comment.