Skip to content

Commit ee22fff

Browse files
committed
minor code cleanup
1 parent 6090e88 commit ee22fff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/java_env.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ java_check_version_cmd <- function(
255255
# Get JAVA_HOME again and check if it's set
256256
current_java_home <- Sys.getenv("JAVA_HOME")
257257
if (current_java_home == "") {
258-
if (!quiet) cli::cli_alert_warning("JAVA_HOME is not set.")
258+
if (!quiet) cli::cli_inform(c("!" = "JAVA_HOME is not set."))
259259
if (!is.null(java_home)) {
260260
Sys.setenv(JAVA_HOME = old_java_home)
261261
}
@@ -296,7 +296,7 @@ java_check_version_system <- function(
296296
quiet
297297
) {
298298
which_java <- tryCatch(
299-
system2("which", args = "java", stdout = TRUE, stderr = TRUE),
299+
Sys.which("java"),
300300
error = function(e) NULL
301301
)
302302
if (is.null(which_java)) {
@@ -367,7 +367,7 @@ java_env_unset <- function(
367367
}
368368
} else {
369369
if (!quiet) {
370-
cli::cli_alert_warning("No .Rprofile found in the project directory: {.path project_path}")
370+
cli::cli_inform(c("!" = "No .Rprofile found in the project directory: {.path project_path}"))
371371
}
372372
}
373373
}

0 commit comments

Comments
 (0)