Skip to content

Commit

Permalink
Regain compatibility with 'package' objects in load_all()
Browse files Browse the repository at this point in the history
This was broken when we changed pkgload::load_all() to take a path
rather than a package object.

Fixes r-lib#1923
  • Loading branch information
jimhester committed Jan 9, 2019
1 parent 9a6cc60 commit bcdde39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# devtools 2.0.1.9000 - Development

* `load_all()` now accepts 'package' objects, regaining previous behavior in
devtools prior to 2.0.0 (#1923)

* `test()`, `test_coverage()` and `test_coverage_file()` now set the
`TESTTHAT_PKG` environment variable, so it is more consistent with running
the tests during `R CMD check` (testthat#787).
Expand Down
5 changes: 5 additions & 0 deletions R/pkgload.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#' @export
load_all <- function(path = ".", reset = TRUE, recompile = FALSE,
export_all = TRUE, helpers = TRUE, quiet = FALSE, ...) {

if (inherits(path, "package")) {
path <- path$path
}

save_all()

pkgload::load_all(
Expand Down

0 comments on commit bcdde39

Please sign in to comment.