halcyon / asdf-java

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

Errors on Linux running with WSL on Windows 10 #152

Open peterlobster opened 3 years ago

peterlobster commented 3 years ago

I installed asdf via Linuxbrew, and haven't really been having many issues (just one really) with any other plugins. However asdf-java gives me an array of strange errors, rendering it unable. I know asdf-java doesn't support Windows yet, but this doesn't really seem like a problem related to WSL or Windows.

Does anyone have any suggestions?

/home/<user>/.asdf/plugins/java/set-java-home.zsh:12: parse error near `\n'
zsh ➡ 
bash: /home/<user>/.asdf/plugins/java/set-java-home.bash: line 1: syntax error near unexpected token `$'{\r''
'ash: /home/<user>/.asdf/plugins/java/set-java-home.bash: line 1: `function _asdf_java_absolute_dir_path {
bash ➡ 
zsh ➡ asdf list-all java
: No such file or directoryjava/bin/list-all: line 3: /home/linuxbrew/.linuxbrew/opt/asdf/lib/utils.bash
/home/<user>/.asdf/plugins/java/bin/list-all: line 5: $'\r': command not found
/home/<user>/.asdf/plugins/java/bin/list-all: line 12: syntax error near unexpected token `$'in\r''
'home/<user>/.asdf/plugins/java/bin/list-all: line 12: `case "${KERNEL_NAME}" in
zsh ➡ asdf info
OS:
Linux 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 GNU/Linux

SHELL:
zsh 5.8 (x86_64-debian-linux-gnu)

ASDF VERSION:
v0.8.1

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/home/linuxbrew/.linuxbrew/opt/asdf

ASDF INSTALLED PLUGINS:
flutter                      https://github.com/oae/asdf-flutter.git
java                         https://github.com/halcyon/asdf-java.git
vars                         https://github.com/excid3/asdf-vars
SgtPooki commented 2 years ago

No such file or directoryjava/bin/list-all: line 3: /home/linuxbrew/.linuxbrew/opt/asdf/lib/utils.bash is also seen on a completely new install of the java plugin on macOS Catalina 10.15.7 (19H1417)

robertoalvesneto commented 2 years ago

I have same issue. I supose it is because the path is different, but I don't understand Shell scrept, so it's just a guess.