Skip to content

Commit

Permalink
remove duplicate repopath helper (#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey authored Jul 26, 2023
1 parent e8ece45 commit 0dad069
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/testthat/helper-setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ renv_tests_setup_packages <- function() {

}

renv_tests_repopath <- function() {
getOption("renv.tests.repopath")
}

renv_tests_setup_libpaths <- function(scope = parent.frame()) {

# remove the sandbox from the library paths, just in case we tried
Expand All @@ -146,15 +142,11 @@ renv_tests_setup_libpaths <- function(scope = parent.frame()) {
renv_tests_setup_repos <- function(scope = parent.frame()) {

# generate our dummy repository
repopath <- getOption("renv.tests.repopath")
if (!is.null(repopath)) {
repopath <- renv_tests_repopath()
if (file.exists(repopath))
return()
}

repopath <- renv_scope_tempfile("renv-repos-", scope = scope)
renv_scope_options(renv.tests.repopath = repopath, scope = scope)

repopath <- renv_tests_repopath()
# create repository source directory
contrib <- file.path(repopath, "src/contrib")
ensure_directory(contrib)

Expand Down

0 comments on commit 0dad069

Please sign in to comment.