From 50717b9d56fdba683f1a0190b47202ba3bb047ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20V=C3=B6lkle?= Date: Wed, 11 Oct 2023 13:19:17 +0200 Subject: [PATCH] fix java_check if runtime missing --- R/selenium.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/selenium.R b/R/selenium.R index e20c5f7..bcfbb43 100644 --- a/R/selenium.R +++ b/R/selenium.R @@ -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 }