Skip to content

Commit

Permalink
Do not show "No version is set for command java" without global Java …
Browse files Browse the repository at this point in the history
…configuration and no Java version set locally
  • Loading branch information
jarmo authored Jul 18, 2024
1 parent 2474b67 commit e0ff52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion set-java-home.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function _asdf_java_absolute_dir_path {

function _asdf_java_update_java_home() {
local java_path
java_path="$(asdf which java)"
java_path="$(asdf which java 2>/dev/null)"
if [[ -n "${java_path}" ]]; then
export JAVA_HOME
JAVA_HOME="$(dirname "$(_asdf_java_absolute_dir_path "${java_path}")")"
Expand Down

0 comments on commit e0ff52d

Please sign in to comment.