Open mgh520 opened 3 years ago
same issue
looks like it was designed that way
// the code from `~/.asdf/plugins/java/set-java-home.bash`
function _asdf_java_prompt_command() {
if [[ "${PWD}" == "${LAST_PWD}" ]]; then
return
fi
LAST_PWD="${PWD}"
_asdf_java_update_java_home
}
same issue
looks like it was designed that way
// the code from `~/.asdf/plugins/java/set-java-home.bash` function _asdf_java_prompt_command() { if [[ "${PWD}" == "${LAST_PWD}" ]]; then return fi LAST_PWD="${PWD}" _asdf_java_update_java_home }
Removing check condition seems to work, but I'm not sure if it makes sense
function _asdf_java_prompt_command() {
#if [[ "${PWD}" == "${LAST_PWD}" ]]; then
# return
#fi
#LAST_PWD="${PWD}"
_asdf_java_update_java_home
}
Curious why this was changed to only update JAVA_HOME if PWD has changed. Maybe I'm doing something wrong but I'm trying to do this:
the path changes, so java-version shows 1.8, but JAVA_HOME does not change because I haven't changed directories.
Use case is something like this: