Skip to content

Commit

Permalink
fix issue with PPM URL transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Sep 23, 2024
1 parent 07a922e commit dea80a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# renv 1.1.0 (UNRELEASED)

* Fixed an issue where repository URLs were inappropriately transformed into
binary repository URLs on Linux. (#1991)

* Fixed an issue where code following `source("renv/activate.R")` in the project
`.Rprofile` was not invoked for projects using RStudio. (#1990)

Expand Down
10 changes: 4 additions & 6 deletions R/ppm.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@ renv_ppm_transform_impl <- function(url) {
return(binurl)
}

# try to query the status endpoint -- if this fails, use our best guess?
# try to query the status endpoint -- if this fails,
# assume the repository is not a ppm URL
base <- dirname(dirname(url))
status <- catch(renv_ppm_status(base))
if (inherits(status, "error")) {
parts <- c(dirname(url), "__linux__", platform, basename(url))
binurl <- paste(parts, collapse = "/")
return(binurl)
}
if (inherits(status, "error"))
return(url)

# iterate through distros and check for a match
for (distro in status$distros) {
Expand Down

0 comments on commit dea80a7

Please sign in to comment.