Skip to content

Commit

Permalink
Merge pull request #1068 from krlmlr/feature/revdep-git2r
Browse files Browse the repository at this point in the history
Fix revdep_check() when git2r is not loaded
  • Loading branch information
hadley committed Feb 11, 2016
2 parents 9f5a175 + 253a1e3 commit d489df9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

* `use_readme_md()` creates a basic `README.md` template (#1064).

* `revdep_check()` doesn't complain about missing `git2r` package anymore
(#1068, @krlmlr).

# devtools 1.10.0

## New features
Expand Down
8 changes: 2 additions & 6 deletions R/build.r
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,9 @@ build <- function(pkg = ".", path = NULL, binary = FALSE, vignettes = TRUE,
ext <- ".tar.gz"
}

# Create temporary library to ensure that default library doesn't get
# Run in temporary library to ensure that default library doesn't get
# contaminated
temp_lib <- tempfile()
dir.create(temp_lib)
on.exit(unlink(temp_lib, recursive = TRUE), add = TRUE)

withr::with_libpaths(c(temp_lib, .libPaths()), R(cmd, path, quiet = quiet))
withr::with_temp_libpaths(R(cmd, path, quiet = quiet))
targz <- paste0(pkg$package, "_", pkg$version, ext)

file.path(path, targz)
Expand Down
5 changes: 3 additions & 2 deletions R/revdep.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ revdep_check <- function(pkg = ".", recursive = FALSE, ignore = NULL,
dir.create(srcpath)

message("Installing ", pkg$package, " ", pkg$version, " from ", pkg$path)
withr::with_libpaths(libpath, install(pkg, reload = FALSE, quiet = TRUE))
withr::with_libpaths(libpath, action = "prefix",
install(pkg, reload = FALSE, quiet = TRUE, dependencies = TRUE))
on.exit(remove.packages(pkg$package, libpath), add = TRUE)

res <- withr::with_envvar(c(
withr::with_envvar(c(
NOT_CRAN = "false",
RGL_USE_NULL = "true"
), {
Expand Down

0 comments on commit d489df9

Please sign in to comment.