Skip to content

Commit 9e96286

Browse files
committed
use a more official check that we're in RStudio
1 parent c79ba2c commit 9e96286

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

DESCRIPTION

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ Suggests:
6868
rgeos,
6969
png,
7070
IRdisplay,
71-
processx
71+
processx,
72+
rstudioapi
7273
Remotes:
7374
tidyverse/ggplot2
7475
LazyData: true

R/utils.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,5 +1023,5 @@ try_library <- function(pkg, fun = NULL) {
10231023
}
10241024

10251025
is_rstudio <- function() {
1026-
identical(Sys.getenv("RSTUDIO", NA), "1")
1026+
requireNamespace('rstudioapi', quietly = TRUE) && rstudioapi::isAvailable()
10271027
}

0 commit comments

Comments
 (0)