Skip to content

Commit

Permalink
fix java_check if runtime missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanvoelkle committed Oct 11, 2023
1 parent 4a7363e commit 50717b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/selenium.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ java_check <- function() {
if (identical(unname(javapath), "")) {
stop("PATH to JAVA not found. Please check JAVA is installed.")
}
java_version <- suppressWarnings(system2(Sys.which("java"), "-version", stdout = TRUE, stderr = TRUE))
if (!is.null(attr(java_version, "status"))) {
stop(paste(java_version, collapse = "\n"))
}
javapath
}

Expand Down

0 comments on commit 50717b9

Please sign in to comment.