Skip to content

Commit

Permalink
Execute the addins in interactive mode (#2350)
Browse files Browse the repository at this point in the history
Co-authored-by: Jim Hester <[email protected]>
  • Loading branch information
jennybc and jimhester authored May 5, 2021
1 parent b9ff989 commit f5dc632
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# devtools (development version)

* RStudio addins now run in interactive mode, rather than background mode (@jennybc, #2350)

* `install(upgrade)` now defaults to 'default' rather than 'ask'. This allows you to control the default asking behavior with the `R_REMOTES_UPGRADE` environment variable (#2345)

* `build_readme()` now uses the `path` argument, as designed (#2344)
Expand Down
5 changes: 4 additions & 1 deletion R/active.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ find_active_file <- function(arg = "file") {
find_test_file <- function(path) {
type <- test_file_type(path)
if (any(is.na(type))) {
rlang::abort(c("Don't know how to find tests for: ", path[is.na(type)]))
rlang::abort(c(
"Don't know how to find tests associated with the active file:",
path[is.na(type)]
))
}

is_test <- type == "test"
Expand Down
8 changes: 4 additions & 4 deletions inst/rstudio/addins.dcf
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Name: Run a test file
Description: Run the current test file, using `devtools::test_active_file()`.
Binding: test_active_file
Interactive: false
Interactive: true

Name: Report test coverage for a file
Description: Calculate and report test coverage for the current test file, using `devtools::test_coverage_active_file()`.
Binding: test_coverage_active_file
Interactive: false
Interactive: true

Name: Report test coverage for a package
Description: Calculate and report the test coverage for the current package, using `devtools::test_coverage()`.
Binding: test_coverage
Interactive: false
Interactive: true

Name: Document a package
Description: A wrapper for `roxygen`'s `roxygen2::roxygenize()`
Binding: document
Interactive: false
Interactive: true

0 comments on commit f5dc632

Please sign in to comment.