Skip to content

Commit

Permalink
Allow dev_sitrep to run outside a package directory
Browse files Browse the repository at this point in the history
Fixes #2127
  • Loading branch information
jimhester committed Sep 26, 2019
1 parent 894bd53 commit b722f80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# devtools (development version)

* `dev_sitrep()` now works if run outside a package directory (#2127).
* `release()` now works if the package root is not in the working directory.

# devtools 2.2.1
Expand Down
4 changes: 2 additions & 2 deletions R/sitrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ r_release <- memoise::memoise(.r_release)
#' dev_sitrep()
#' }
dev_sitrep <- function(pkg = ".", debug = FALSE) {
pkg <- as.package(pkg)
pkg <- tryCatch(as.package(pkg), error = function(e) NULL)

has_build_tools <- !is_windows || pkgbuild::has_build_tools(debug = debug)

Expand All @@ -83,7 +83,7 @@ dev_sitrep <- function(pkg = ".", debug = FALSE) {
rtools_path = if (has_build_tools) pkgbuild::rtools_path(),
devtools_version = packageVersion("devtools"),
devtools_deps = remotes::package_deps("devtools", dependencies = NA),
pkg_deps = remotes::dev_package_deps(pkg$path, dependencies = TRUE),
pkg_deps = if (!is.null(pkg)) { remotes::dev_package_deps(pkg$path, dependencies = TRUE) },
rstudio_version = if (rstudioapi::isAvailable()) rstudioapi::getVersion(),
rstudio_msg = check_for_rstudio_updates()
),
Expand Down

0 comments on commit b722f80

Please sign in to comment.