Skip to content

Commit

Permalink
Unset JAVA_HOME and JDK_HOME when no java version set by asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmo authored Jul 18, 2024
1 parent 2474b67 commit a9d7a1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions set-java-home.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function _asdf_java_update_java_home() {
export JAVA_HOME
JAVA_HOME="$(dirname "$(_asdf_java_absolute_dir_path "${java_path}")")"
export JDK_HOME=${JAVA_HOME}
else
unset JAVA_HOME
unset JDK_HOME
fi
}

Expand Down

0 comments on commit a9d7a1d

Please sign in to comment.