File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,10 @@ tidy_unzip <- function(zipfile) {
232232 unlink(zipfile )
233233 }
234234
235- done(" Opening " , value(target ), " in the file manager" )
236- utils :: browseURL(normalizePath(target ))
235+ if (! in_rstudio_server()) {
236+ done(" Opening " , value(target ), " in the file manager" )
237+ utils :: browseURL(normalizePath(target ))
238+ }
237239 }
238240
239241 invisible (target )
Original file line number Diff line number Diff line change @@ -104,6 +104,13 @@ in_rstudio <- function(base_path = proj_get()) {
104104 normalizePath(proj ) == normalizePath(base_path )
105105}
106106
107+ in_rstudio_server <- function () {
108+ if (! rstudioapi :: isAvailable()) {
109+ return (FALSE )
110+ }
111+ identical(rstudioapi :: versionInfo()$ mode , " server" )
112+ }
113+
107114parse_rproj <- function (file ) {
108115 lines <- as.list(readLines(file ))
109116 has_colon <- grepl(" :" , lines )
You can’t perform that action at this time.
0 commit comments