halcyon / asdf-java

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

Unknown command: `asdf which java` #170

Open rutsatz opened 2 years ago

rutsatz commented 2 years ago

Today when installing another application from brew, it automatically updated the asdf version.

Now, any command I run in the terminal, it pops up this error:

Unknown command: `asdf which java`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/Cellar/asdf/0.8.1_1/libexec/lib/commands/command-help.bash: No such file or directory

And java stopped working:

~ java -version
/Users/rutsatz/.asdf/shims/java: line 5: /usr/local/Cellar/asdf/0.8.1_1/libexec/bin/asdf: No such file or directory
/Users/rutsatz/.asdf/shims/java: line 5: exec: /usr/local/Cellar/asdf/0.8.1_1/libexec/bin/asdf: cannot execute: No such file or directory
Unknown command: `asdf which java`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory

I'm using the latest version of Mac OS.

peterpandelidis commented 2 years ago

I was getting this issue after doing an update as well. I got around it by just uninstalling asdf via homebrew and then reinstalling. Couldn't find a better solution.

flybonzai commented 2 years ago

Experiencing this same issue, and uninstalling and reinstalling doesn't work for me on Mac. Even tried grabbing the raw file for 0.9.0 from Github to install, but brew wasn't having it. Please update with a fix!

jrichocean commented 2 years ago

restarting my computer worked, sourcing iterm and restarting iterm did not.