Skip to content

Commit

Permalink
Oops, check for RStudio AND for server
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Mar 19, 2023
1 parent e2c3e34 commit fa49d20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ is.oauth_app <- function(x) inherits(x, "oauth_app")
is.oauth_endpoint <- function(x) inherits(x, "oauth_endpoint")

is_rstudio_server <- function() {
Sys.getenv("RSTUDIO") == "1"
Sys.getenv("RSTUDIO") == "1" &&
Sys.getenv("RSTUDIO_PROGRAM_MODE") == "server"
}

add_line <- function(path, line) {
Expand Down

0 comments on commit fa49d20

Please sign in to comment.