KWB-R/pkgmeta

Vignette build error on Travis (due to codemetar::create_codemeta() error)

Closed this issue · 2 comments

Running the code below in the "analyse-rpackages.Rmd" vignette on Travis

pkgs <- pkgmeta::get_github_packages()

pkgs_codemetar <- withr::with_libpaths(new = "/home/travis/R/Library",
                                       code = {
                                       lapply(pkgs$name,
                                                function(x) {
                           print(glue::glue("Writing codemeta for R package {x}"))
                           codemetar::create_codemeta(pkg = x)})})

errors with the following output on Travis:

── Building articles ───────────────────────────────────────────────────────────
Writing 'articles/index.html'
Reading 'vignettes/analyse-rpackages.Rmd'
Error in if (grepl("github.com\\/.*\\/.*", cm$codeRepository)) { : 
  argument is of length zero
Error in if (grepl("github.com\\/.*\\/.*", cm$codeRepository)) { : 
  argument is of length zero
Calls: <Anonymous> ... build_site -> build_site_external -> <Anonymous> -> get_result
Execution halted
Script failed with status 1

see https://travis-ci.org/KWB-R/pkgmeta/jobs/480645714#L4356

Any idea codemetar expert @hsonne why this happens?

7594aca tries to get more details on the error by executing pkgmeta::write_pkg_codemeta() before running the vignettes

Closed in 7c07082