halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
467 stars 86 forks source link

asdf_update_java_home precmd hook changes directory on every command #135

Closed wnkz closed 3 years ago

wnkz commented 3 years ago

Hello, At first I though having a bug with direnv but after debugging in https://github.com/direnv/direnv/issues/726 it appears that additional messages are caused by asdf_update_java_home precmd hook.

Change was introduced here https://github.com/halcyon/asdf-java/pull/76.

My guess is that the cd -P makes direnv load / unload on every command. Maybe we don't need to update JAVA_HOME before every command ?

My suggestions would be: