Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch renv GitHub bug #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
access top the lists of translated strings. These have replaced the `tr_()`
strings at the point of generation.

## BUG FIX

* `manage_deps()` can now provision a GitHub package from the lockfile if it was
not previously installed on the system (reported: @pratikunterwegs,
carpentries/actions#32; fixed: @zkamvar, #533)

# sandpaper 0.16.1 (2023-12-14)

## BUG FIX
Expand Down
6 changes: 6 additions & 0 deletions R/utils-renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ callr_manage_deps <- function(path, repos, snapshot, lockfile_exists) {
deps <- unique(renv::dependencies(path = path, root = path, dev = TRUE)$Package)
pkgs <- setdiff(deps, installed)
needs_hydration <- length(pkgs) > 0
if (packageVersion("renv") >= "1.0.0") {
# We only need to hydrate the packages that do not exist in the lockfile
# and that are not installed
lock <- renv::lockfile_read(renv_lock)
pkgs <- setdiff(pkgs, names(lock$Packages))
}
} else {
# If there is not a lockfile, we need to run a fully hydration
pkgs <- NULL
Expand Down