Closed eed3si9n closed 4 years ago
The regex starts with a whitespace
grep -o " $ADOPTOPENJDK\.[0-9\.]*hs-adpt"
I don't think it matches 11.0.8.hs
? In my local test, the current regex seems to work fine
luc@luclin:~$ sdk list java
...
| | 11.0.8.hs | adpt | | 11.0.8.hs-adpt
...
| | 8.0.265.hs | adpt | | 8.0.265.hs-adpt
...
luc@luclin:~$ sdk list java | grep -o " 8\.[0-9\.]*hs-adpt"
8.0.265.hs-adpt
luc@luclin:~$ sdk list java | grep -o " 11\.[0-9\.]*hs-adpt"
11.0.8.hs-adpt
11.0.3.hs-adpt
I assume you were running into an issue somewhere? What was it?
Note that this other PR #718 claims to have fixed the same thing already.
I was running into the issue elsewhere using the original regex, and didn't realize it's been fixed by whitespace thing.
👍 thanks!
Since
11.0.8.hs
came out the existing regex to pick JDK 8 ends up picking non-existing8.hs-adpt
. The fixed regex should select8.0.265.hs-adpt
etc correctly.