diff --git a/DESCRIPTION b/DESCRIPTION index 97f4c10..4a46a90 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")), diff --git a/R/check-on-cran.R b/R/check-on-cran.R index 40d32b2..d3a46f5 100644 --- a/R/check-on-cran.R +++ b/R/check-on-cran.R @@ -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) { diff --git a/codemeta.json b/codemeta.json index 5b83c61..4b07c97 100644 --- a/codemeta.json +++ b/codemeta.json @@ -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",