Skip to content

Commit 0125e82

Browse files
committed
don't suggest/require rstudioapi for checking whether we have access to RStudio
1 parent 0d4a740 commit 0125e82

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Suggests:
7070
IRdisplay,
7171
processx,
7272
plotlyGeoAssets,
73-
rstudioapi,
7473
forcats
7574
LazyData: true
7675
RoxygenNote: 6.0.1.9000

R/utils.R

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,14 +1063,7 @@ try_library <- function(pkg, fun = NULL) {
10631063
"Please install and try again.", call. = FALSE)
10641064
}
10651065

1066+
# similar logic to rstudioapi::isAvailable()
10661067
is_rstudio <- function() {
1067-
requireNamespace('rstudioapi', quietly = TRUE) && rstudioapi::isAvailable()
1068-
}
1069-
1070-
1071-
# TODO: warn Windows users to use 1.2.x in some scenarios?
1072-
# https://github.com/ropensci/plotly/issues/1211
1073-
rstudio_version <- function() {
1074-
if (!is_rstudio()) return(NA)
1075-
rstudioapi::versionInfo()$version
1068+
identical(.Platform$GUI, "RStudio")
10761069
}

0 commit comments

Comments
 (0)