You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
482 B

#' Get Chrome version
#'
#' @md
#' @param quiet if `TRUE`, no messages are displayed
#' @param chrome_bin the path to Chrome (auto-set from `HEADLESS_CHROME` environment variable)
#' @return the Chrome version string (invisibly)
#' @export
#' @examples
#' chrome_version()
chrome_version <- function(quiet = FALSE, chrome_bin=Sys.getenv("HEADLESS_CHROME")) {
res <- processx::run(chrome_bin, "--version")
if (!quiet) message(res$stdout)
return(invisible(trimws(res$stdout)))
}