Skip to content

Commit cef1edc

Browse files
jt14dengithub-actions[bot]
authored andcommitted
[actions] update 1 packages
1 parent b77adf0 commit cef1edc

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

renv/activate.R

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
local({
33

44
# the requested version of renv
5-
version <- "1.1.7"
6-
attr(version, "md5") <- "dd5d60f155dadff4c88c2fc6680504b4"
5+
version <- "1.2.0"
6+
attr(version, "md5") <- "b7d230b07507f361d3bcf794d157a188"
77
attr(version, "sha") <- NULL
88

99
# the project directory
@@ -226,13 +226,17 @@ local({
226226
section <- header(sprintf("Bootstrapping renv %s", friendly))
227227
catf(section)
228228

229+
# ensure the target library path exists; required for file.copy(..., recursive = TRUE)
230+
dir.create(library, showWarnings = FALSE, recursive = TRUE)
231+
229232
# try to install renv from cache
230233
md5 <- attr(version, "md5", exact = TRUE)
231234
if (length(md5)) {
232235
pkgpath <- renv_bootstrap_find(version)
233236
if (length(pkgpath) && file.exists(pkgpath)) {
234-
file.copy(pkgpath, library, recursive = TRUE)
235-
return(invisible())
237+
ok <- file.copy(pkgpath, library, recursive = TRUE)
238+
if (isTRUE(ok))
239+
return(invisible())
236240
}
237241
}
238242

@@ -1231,6 +1235,21 @@ local({
12311235
}
12321236

12331237
renv_bootstrap_run <- function(project, libpath, version) {
1238+
tryCatch(
1239+
renv_bootstrap_run_impl(project, libpath, version),
1240+
error = function(e) {
1241+
msg <- paste(
1242+
"failed to bootstrap renv: the project will not be loaded.",
1243+
paste("Reason:", conditionMessage(e)),
1244+
"Use `renv::activate()` to re-initialize the project.",
1245+
sep = "\n"
1246+
)
1247+
warning(msg, call. = FALSE)
1248+
}
1249+
)
1250+
}
1251+
1252+
renv_bootstrap_run_impl <- function(project, libpath, version) {
12341253

12351254
# perform bootstrap
12361255
bootstrap(version, libpath)

renv/profiles/lesson-requirements/renv.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"R": {
3-
"Version": "4.5.2",
3+
"Version": "4.5.3",
44
"Repositories": [
55
{
66
"Name": "carpentries",
@@ -19,7 +19,7 @@
1919
"Packages": {
2020
"renv": {
2121
"Package": "renv",
22-
"Version": "1.1.7",
22+
"Version": "1.2.0",
2323
"Source": "Repository",
2424
"Type": "Package",
2525
"Title": "Project Environments",
@@ -61,16 +61,16 @@
6161
"webfakes"
6262
],
6363
"Encoding": "UTF-8",
64+
"NeedsCompilation": "yes",
6465
"RoxygenNote": "7.3.3",
6566
"VignetteBuilder": "knitr",
6667
"Config/Needs/website": "tidyverse/tidytemplate",
6768
"Config/testthat/edition": "3",
6869
"Config/testthat/parallel": "true",
6970
"Config/testthat/start-first": "bioconductor,python,install,restore,snapshot,retrieve,remotes",
70-
"NeedsCompilation": "no",
7171
"Author": "Kevin Ushey [aut, cre] (ORCID: <https://orcid.org/0000-0003-2880-7407>), Hadley Wickham [aut] (ORCID: <https://orcid.org/0000-0003-4757-117X>), Posit Software, PBC [cph, fnd]",
7272
"Maintainer": "Kevin Ushey <kevin@rstudio.com>",
73-
"Repository": "CRAN"
73+
"Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
7474
}
7575
}
7676
}

0 commit comments

Comments
 (0)