Skip to content

Commit

Permalink
GHA repos: fix update check on non-Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 13, 2024
1 parent c57dec4 commit c01bf84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/gh-repo.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ ghrepo <- local({
# unfortunate name collision
repo_slug <- repo
rm(repo)
pkg_type <- if (Sys.info()[["sysname"]] == "Linux") "source" else "binary"
contrib_url <- utils::contrib.url(repos = "", type = pkg_type)
contrib_url <- utils::contrib.url(repos = "", type = .Platform$pkgType)
repo$update_gh(
repo_slug,
paste0(subdir, contrib_url),
Expand Down Expand Up @@ -111,8 +110,9 @@ ghrepo <- local({
proc <- cli::cli_process_start(
"Getting packages from {.emph {repo}/{subdir}}."
)
platform <- if (.Platform$pkgType == "source") "source" else pkgcache::current_r_platform()
r_mirror <- suppressMessages(pkgcache::cranlike_metadata_cache$new(
platforms = "source",
platforms = platform,
bioc = FALSE,
cran_mirror = get_mirror_repo_url(repo, subdir),
repos = NULL,
Expand Down

0 comments on commit c01bf84

Please sign in to comment.