Skip to content

Commit

Permalink
Use pkgload instead of devtools to find package path
Browse files Browse the repository at this point in the history
  • Loading branch information
dschlaep committed Oct 17, 2019
1 parent a599530 commit 66c1bbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/helper_testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pkg_temp_dir <- function() {
path <- file.path("..", "..")
}

if (!dir.exists(path) && interactive() && requireNamespace("devtools")) {
path <- devtools::as.package(".")[["path"]]
if (!dir.exists(path) && interactive() && requireNamespace("pkgload")) {
path <- pkgload::pkg_path()
}

path
Expand Down

0 comments on commit 66c1bbb

Please sign in to comment.