Skip to content

Commit

Permalink
enable autoloader when loading alternate project (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Aug 2, 2024
1 parent 9d9731e commit 2c51854
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/load.R
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,12 @@ renv_load_switch <- function(project) {
}

# signal that we're unloading now
renv_scope_options(renv.unload.project = project)
# also ensure that the autoloader will be run when we source the active script
# https://github.com/rstudio/renv/issues/1959
renv_scope_options(
renv.unload.project = project,
renv.config.autoloader.enabled = TRUE
)

# perform the unload
unload()
Expand Down

0 comments on commit 2c51854

Please sign in to comment.