|
2 | 2 | local({ |
3 | 3 |
|
4 | 4 | # the requested version of renv |
5 | | - version <- "1.1.6" |
6 | | - attr(version, "md5") <- "3036c4b273d882c56e8cdd660ebaf6f0" |
| 5 | + version <- "1.1.7" |
| 6 | + attr(version, "md5") <- "dd5d60f155dadff4c88c2fc6680504b4" |
7 | 7 | attr(version, "sha") <- NULL |
8 | 8 |
|
9 | 9 | # the project directory |
@@ -169,6 +169,16 @@ local({ |
169 | 169 | if (quiet) |
170 | 170 | return(invisible()) |
171 | 171 |
|
| 172 | + # also check for config environment variables that should suppress messages |
| 173 | + # https://github.com/rstudio/renv/issues/2214 |
| 174 | + enabled <- Sys.getenv("RENV_CONFIG_STARTUP_QUIET", unset = NA) |
| 175 | + if (!is.na(enabled) && tolower(enabled) %in% c("true", "1")) |
| 176 | + return(invisible()) |
| 177 | + |
| 178 | + enabled <- Sys.getenv("RENV_CONFIG_SYNCHRONIZED_CHECK", unset = NA) |
| 179 | + if (!is.na(enabled) && tolower(enabled) %in% c("false", "0")) |
| 180 | + return(invisible()) |
| 181 | + |
172 | 182 | msg <- sprintf(fmt, ...) |
173 | 183 | cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") |
174 | 184 |
|
@@ -266,22 +276,22 @@ local({ |
266 | 276 | # check for repos override |
267 | 277 | repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) |
268 | 278 | if (!is.na(repos)) { |
269 | | - |
| 279 | + |
270 | 280 | # split on ';' if present |
271 | 281 | parts <- strsplit(repos, ";", fixed = TRUE)[[1L]] |
272 | | - |
| 282 | + |
273 | 283 | # split into named repositories if present |
274 | 284 | idx <- regexpr("=", parts, fixed = TRUE) |
275 | 285 | keys <- substring(parts, 1L, idx - 1L) |
276 | 286 | vals <- substring(parts, idx + 1L) |
277 | 287 | names(vals) <- keys |
278 | | - |
| 288 | + |
279 | 289 | # if we have a single unnamed repository, call it CRAN |
280 | 290 | if (length(vals) == 1L && identical(keys, "")) |
281 | 291 | names(vals) <- "CRAN" |
282 | | - |
| 292 | + |
283 | 293 | return(vals) |
284 | | - |
| 294 | + |
285 | 295 | } |
286 | 296 |
|
287 | 297 | # check for lockfile repositories |
@@ -547,6 +557,12 @@ local({ |
547 | 557 |
|
548 | 558 | # infer path to renv cache |
549 | 559 | cache <- Sys.getenv("RENV_PATHS_CACHE", unset = "") |
| 560 | + if (!nzchar(cache)) { |
| 561 | + root <- Sys.getenv("RENV_PATHS_ROOT", unset = NA) |
| 562 | + if (!is.na(root)) |
| 563 | + cache <- file.path(root, "cache") |
| 564 | + } |
| 565 | + |
550 | 566 | if (!nzchar(cache)) { |
551 | 567 | tools <- asNamespace("tools") |
552 | 568 | if (is.function(tools$R_user_dir)) { |
@@ -1036,7 +1052,7 @@ local({ |
1036 | 1052 |
|
1037 | 1053 | renv_bootstrap_validate_version_release <- function(version, description) { |
1038 | 1054 | expected <- description[["Version"]] |
1039 | | - is.character(expected) && identical(expected, version) |
| 1055 | + is.character(expected) && identical(c(expected), c(version)) |
1040 | 1056 | } |
1041 | 1057 |
|
1042 | 1058 | renv_bootstrap_hash_text <- function(text) { |
|
0 commit comments