Skip to content

Commit

Permalink
checking the env var is not enough; we have to make sure RStudio is r…
Browse files Browse the repository at this point in the history
…unning via rstudioapi::isAvailable()
  • Loading branch information
yihui committed Jul 18, 2024
1 parent 02973d2 commit 6a2991d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/session.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ session_info = function(packages = NULL, dependencies = TRUE) {
res$matprod = res$BLAS = res$LAPACK = NULL
res$running = paste(c(res$running, if (Sys.getenv('POSITRON') == '1') {
c(', Positron ', Sys.getenv('POSITRON_VERSION'))
} else if (Sys.getenv('RSTUDIO') == '1') {
} else if (loadable('rstudioapi') && rstudioapi::isAvailable()) {
c(', RStudio ', rstudioapi::getVersion())
}), collapse = '')

Expand Down

0 comments on commit 6a2991d

Please sign in to comment.