Skip to content

Commit

Permalink
Protect call
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Nov 22, 2023
1 parent 39a6567 commit f953c52
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/testthat/helper.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

# Work around R.cache bug on CI
dir.create(
tools::R_user_dir("R.cache", which = "cache"),
recursive = TRUE,
showWarnings = FALSE
)
# getNamespace("R.cache")$setCachePath(c("styler", styler:::styler_version), tempdir())
if (getRversion() >= "4.0.0" && identical(Sys.getenv("CI"), "true")) {
dir.create(
tools::R_user_dir("R.cache", which = "cache"),
recursive = TRUE,
showWarnings = FALSE
)
}

expect_error_free <- function(...) {
expect_error(..., regexp = NA)
Expand Down

0 comments on commit f953c52

Please sign in to comment.