Skip to content

Commit

Permalink
ensure renv unloaded on devtools::load_all() (#1591)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey authored Jul 25, 2023
1 parent dc09173 commit fd5aedc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/aaa.R
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

# global variables
the <- new.env(parent = emptyenv())
7 changes: 7 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

}

# NOTE: required for devtools::load_all()
.onDetach <- function(libpath) {
package <- Sys.getenv("DEVTOOLS_LOAD", unset = NA)
if (identical(package, .packageName))
.onUnload(libpath)
}

renv_zzz_load <- function() {

# NOTE: needs to be visible to embedded instances of renv as well
Expand Down

0 comments on commit fd5aedc

Please sign in to comment.