Skip to content

Commit

Permalink
set cran mirror in pkgchk_on_cran if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Aug 27, 2024
1 parent d48575e commit e063319
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgcheck
Title: rOpenSci Package Checks
Version: 0.1.2.055
Version: 0.1.2.056
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
6 changes: 6 additions & 0 deletions R/check-on-cran.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ pkgchk_on_cran <- function (checks) {
)
pkg <- desc$Package

op <- options ()
if (is.null (getOption ("repos"))) {
# Needed for GitHub runners, because avail.pkgs fails with no mirror set
options (repos = c (CRAN = "https://cloud.r-project.org"))
}
ap <- data.frame (utils::available.packages (),
stringsAsFactors = FALSE
)
options (op)
res <- pkg %in% ap$Package

if (res) {
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/pkgcheck",
"issueTracker": "https://github.com/ropensci-review-tools/pkgcheck/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.2.055",
"version": "0.1.2.056",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit e063319

Please sign in to comment.