Skip to content

Commit

Permalink
Fix run_examples(fresh = TRUE)
Browse files Browse the repository at this point in the history
Fixes #2264
  • Loading branch information
jimhester committed Sep 17, 2020
1 parent d6c8add commit 8b09c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* `check()` only re-documents if you have a matching version of roxygen2
(#2263).
* `run_examples(fresh = TRUE)` again works without error (#2264)

* `pkgload::inst()` is no longer re-exported (#2218).

Expand Down
8 changes: 3 additions & 5 deletions R/run-examples.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ run_examples <- function(pkg = ".", start = NULL, show = TRUE, run_donttest = FA

if (fresh) {
to_run <-
eval(substitute(
function() devtools::run_examples(pkg = path, start = start, test = test, run = run, fresh = FALSE),
list(path = pkg$path, start = start, test = test, run = run)
))
callr::r(to_run, show = TRUE, spinner = FALSE, stderr = "2>&1")
function(path, start, run_donttest, run_dontrun) devtools::run_examples(pkg = path, start = start, run_donttest = run_donttest, run_dontrun = run_dontrun, document = FALSE)

callr::r(to_run, args = list(path = pkg$path, start = start, run_donttest = run_donttest, run_dontrun = run_dontrun), show = TRUE, spinner = FALSE, stderr = "2>&1")
return(invisible())
}

Expand Down

0 comments on commit 8b09c1b

Please sign in to comment.