ThinkR-open / dockerfiler

Easy Dockerfile Creation from R
https://thinkr-open.github.io/dockerfiler/
Other
169 stars 25 forks source link

fix #24 #25

Closed VincentGuyader closed 2 years ago

VincentGuyader commented 2 years ago

@ColinFay I tried to use {attempt} (map_try_catch ) without any succes to avoid to depend to {purrr::possibly}

but this IS the PR I will make

psr <- purrr::possibly(pak::pkg_system_requirements,otherwise = character(0)) pkg_sysreqs <- lapply(pkg_os, function(x) do.call(psr, x))

feel free to adapt ( TryCatch, attempt::xxx ?)

ColinFay commented 2 years ago

@VincentGuyader here is the attempt version

pkg_sysreqs <- attempt::map_try_catch(
    pkg_os,
    function(x) do.call(pak::pkg_system_requirements, x),
    .e = ~ character(0)
  )