Closed VincentGuyader closed 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 ?)
@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) )
@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 ?)