From 1e3a23c0a76df887a89ab8c53334cfc64f22a787 Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:52:34 -0500 Subject: [PATCH] Use `purrr::walk()` to get better error message --- R/run-examples.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/run-examples.R b/R/run-examples.R index cfc87fd72..8cfc74ba5 100644 --- a/R/run-examples.R +++ b/R/run-examples.R @@ -65,7 +65,7 @@ run_examples <- function(pkg = ".", start = NULL, show = deprecated(), run_dontt load_all(pkg$path, reset = TRUE, export_all = FALSE) on.exit(load_all(pkg$path, reset = TRUE)) - lapply(files, pkgload::run_example, run_donttest = run_donttest, run_dontrun = run_dontrun) + purrr::walk(files, function(x) pkgload::run_example(x, run_donttest = run_donttest, run_dontrun = run_dontrun)) invisible() }