-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
when runnin the set-java-home.szh on my mac I get this
/Users/xxx/.asdf/plugins/java/set-java-home.zsh
/Users/xxx/.asdf/plugins/java/set-java-home.zsh: line 11: autoload: command not found
/Users/xxx/.asdf/plugins/java/set-java-home.zsh: line 12: add-zsh-hook: command not found
I fixed the issue by adding the shebang (#!/bin/zsh)
#!/bin/zsh <-----------------------added this to fix the issue
asdf_update_java_home() {
local java_path
java_path="$(asdf which java)"
if [[ -n "${java_path}" ]]; then
export JAVA_HOME
JAVA_HOME="$(dirname "$(dirname "${java_path:A}")")"
export JDK_HOME=${JAVA_HOME}
fi
}
autoload -U add-zsh-hook
add-zsh-hook precmd asdf_update_java_home
Do you want me to create a PR for this ?
ovaladares
Metadata
Metadata
Assignees
Labels
No labels