Skip to content

Commit

Permalink
Make sure Python dependencies also get restored by manage_deps()
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmlft committed May 3, 2023
1 parent 1495f89 commit cea48bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/utils-renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,12 @@ callr_manage_deps <- function(path, repos, snapshot, lockfile_exists) {
# recorded.
if (lockfile_exists) {
cli::cli_alert("Restoring any dependency versions")
res <- renv::restore(project = path, library = renv_lib,
lockfile = renv_lock, prompt = FALSE)
# Load profile, this ensures Python dependencies also get restored
renv::load(project = path)
on.exit({
invisible(utils::capture.output(renv::deactivate(project = path), type = "message"))
}, add = TRUE)
res <- renv::restore(project = path, prompt = FALSE)
}
if (snapshot) {
# 3. Load the current profile, unloading it when we exit
Expand Down

0 comments on commit cea48bf

Please sign in to comment.