Skip to content

Commit

Permalink
fixup for restore with pak (#1883)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Oct 10, 2024
1 parent 5725cde commit 08a1518
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# renv (development version)

* Fixed an issue where `renv::restore()` could fail when using `pak` if one or
more of the packages to be installed declared remotes that were incompatible
with the package records recorded in the `renv` lockfile. (#1883)

* Fixed an issue where headers were not properly passed to `available.packages()`
during `renv` bootstrap. (#1942)

Expand Down
5 changes: 4 additions & 1 deletion R/pak.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,13 @@ renv_pak_restore <- function(lockfile,
return(invisible(TRUE))
}

# perform installation
# perform installation -- use 'dependencies = FALSE' to disable the
# pak dependency resolver, as the lockfile should already be complete
# https://github.com/rstudio/renv/issues/1883#issuecomment-2404113473
pak$pkg_install(
pkg = remotes,
ask = prompt,
dependencies = FALSE
)

# return installed records
Expand Down

0 comments on commit 08a1518

Please sign in to comment.