R/system-check-scalar-isVscode.R

Defines functions isVscode

Documented in isVscode

#' Is the current R session running inside Visual Studio Code?
#'
#' @name check-scalar-isVscode
#' @note Updated 2022-10-18.
#'
#' @inherit check return
#'
#' @examples
#' isVscode()
NULL



#' @rdname check-scalar-isVscode
#' @export
isVscode <- function() {
    ok <- isTRUE(nzchar(Sys.getenv("VSCODE_INIT_R")))
    if (!isTRUE(ok)) {
        return(false("Visual Studio Code not detected."))
    }
    TRUE
}
steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.