halcyon / asdf-java

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

Error: Permission denied after using the asdf list-all java command #232

Open zwh8800 opened 3 months ago

zwh8800 commented 3 months ago

Hello,

I just used the command asdf plugin-add java https://github.com/halcyon/asdf-java.git to install this plugin. However, when I used the command asdf list-all java to list the candidate JDKs, I encountered the following error:

Plugin java's list-all callback script failed with output:
/Users/wastecat/.asdf/lib/functions/versions.bash: line 98: /Users/wastecat/.asdf/plugins/java/bin/list-all: Permission denied

My system is macOS 14.4.1, Apple M3 Pro.

obscurelyme commented 2 months ago

I had experienced this same issue. Running chmod on the functions file wasn't working or anything else for that matter, but I was able to leverage a hacky workaround by deleting the symlinks inside ~/.asdf/installs/java/bin and then recreating them. Happy to know of a better solution if one exists.

aarroxellas commented 2 months ago

Not a plugin problem but rather symlinks being checked out as plain text files from git repo.

Your core.symlinks might be set to false. Check that by running:

git config --get core.symlinks

I recommend adding this to your ~ /.gitconfig

[core]
    symlinks = true

Do remove the plugin asdf plugin remove java and re-install it asdf plugin add java