diff --git a/set-java-home.zsh b/set-java-home.zsh index d9b134ab..bf55e085 100644 --- a/set-java-home.zsh +++ b/set-java-home.zsh @@ -1,9 +1,3 @@ -function absolute_dir_path { - local absolute_path - absolute_path="$( cd -P "$( dirname "$1" )" && pwd )" - echo "$absolute_path" -} - asdf_update_java_home() { local java_path java_path="$(asdf which java)" @@ -13,7 +7,7 @@ asdf_update_java_home() { JAVA_HOME="$(/usr/libexec/java_home)" else export JAVA_HOME - JAVA_HOME="$(dirname "$(absolute_dir_path "${java_path}")")" + JAVA_HOME="$(dirname "$(dirname "${java_path:A}")")" fi fi }