halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
460 stars 85 forks source link

No such file or directory happend when I installed asdf by Homebrew #188

Closed kackey0-1 closed 1 year ago

kackey0-1 commented 2 years ago

Issue

No such file or directory happend when I installed asdf through brew

➜  java asdf install java corretto-17.0.4.9.1 
/Users/xxxxx/.asdf/plugins/java/bin/install: line 3: /Users/xxxxx/.asdf/lib/utils.bash: No such file or directory
##################################################################################################################################################################################################### 100.0%
amazon-corretto-17.0.4.9.1-macosx-aarch64.tar.gz
amazon-corretto-17.0.4.9.1-macosx-aarch64.tar.gz: OK
/Users/xxxxx/.asdf/plugins/java/bin/install: line 130: get_asdf_config_value: command not found

How to resolve

load utils.bash from where it located.

source "${ASDF_DIR:-$(dirname $(dirname $(cut $' ' -f 2 "$(which asdf)" | tail -n 1 | sed -e 's/"//g')))}/lib/utils.bash"
jdx commented 1 year ago

please consider vendoring the asdf utils into asdf-java. It would help my new project out: https://github.com/jdxcode/rtx/issues/2