Skip to content

Commit

Permalink
tweak this message
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Mar 15, 2024
1 parent d59089c commit 2337dd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/development.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ dev_mode_auto <- function(version) {
check_mode <- function(mode) {
valid_mode <- c("auto", "default", "release", "devel", "unreleased")
if (!mode %in% valid_mode) {
abort(paste0(
"`development.mode` in `_pkgdown.yml` must be one of ",
paste(valid_mode, collapse = ", ")
cli::cli_abort(c(
"{.field development.mode} must be one of {.or {valid_mode}}.",
i = "Use an approriate value in {.run [_pkgdown.yml](usethis::edit_pkgdown_config())}"
))
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/_snaps/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
check_mode("foo")
Condition
Error in `check_mode()`:
! `development.mode` in `_pkgdown.yml` must be one of auto, default, release, devel, unreleased
! development.mode must be one of auto, default, release, devel, or unreleased.
i Use an approriate value in `_pkgdown.yml`

0 comments on commit 2337dd9

Please sign in to comment.