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

renv 1.0.11 #733

Merged
merged 4 commits into from
Oct 16, 2024
Merged
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
3 changes: 2 additions & 1 deletion .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (!"https://rse.pik-potsdam.de/r/packages" %in% getOption("repos")) {
# bootstrapping, will only run once after this repo is freshly cloned
if (isTRUE(rownames(installed.packages(priority = "NA")) == "renv")) {
message("R package dependencies are not installed in this renv, installing now...")
renv::install("rmarkdown", prompt = FALSE) # rmarkdown is required to find dependencies in Rmd files
renv::hydrate(prompt = FALSE, report = FALSE) # auto-detect and install all dependencies
message("Finished installing R package dependencies.")
if (!("upstream" %in% gert::git_remote_list()$name)) {
Expand All @@ -37,5 +38,5 @@ if (isTRUE(rownames(installed.packages(priority = "NA")) == "renv")) {

# in case bootstrapping fails halfway, install piamenv and rely on requirement auto-fixing
if (tryCatch(utils::packageVersion("piamenv") < "0.5.5", error = function(error) TRUE)) {
renv::install("piamenv", type = getOption("pkgType"), prompt = FALSE)
renv::install("piamenv", prompt = FALSE)
}
10 changes: 4 additions & 6 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local({

# the requested version of renv
version <- "1.0.9"
version <- "1.0.11"
attr(version, "sha") <- NULL

# the project directory
Expand Down Expand Up @@ -368,8 +368,7 @@ local({
quiet = TRUE
)

if ("headers" %in% names(formals(utils::download.file)))
{
if ("headers" %in% names(formals(utils::download.file))) {
headers <- renv_bootstrap_download_custom_headers(url)
if (length(headers) && is.character(headers))
args$headers <- headers
Expand Down Expand Up @@ -457,9 +456,8 @@ local({

# add custom headers if available -- note that
# utils::available.packages() will pass this to download.file()
if ("headers" %in% names(formals(utils::download.file)))
{
headers <- renv_bootstrap_download_custom_headers(url)
if ("headers" %in% names(formals(utils::download.file))) {
headers <- renv_bootstrap_download_custom_headers(repos)
if (length(headers) && is.character(headers))
args$headers <- headers
}
Expand Down
Loading