Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: sdk list java in offline mode, the installed list is incomplete #1125

Open
4ooc opened this issue Sep 21, 2022 · 1 comment · May be fixed by #1129
Open

Bug: sdk list java in offline mode, the installed list is incomplete #1125

4ooc opened this issue Sep 21, 2022 · 1 comment · May be fixed by #1129
Labels

Comments

@4ooc
Copy link

4ooc commented Sep 21, 2022

Bug report

I have installed 3 JDKs, but only show 2 JDKs in offline mode.

To reproduce

//In offline
sdk list java
--------------------------------------------------------------------------------
Offline: only showing installed java versions
--------------------------------------------------------------------------------
 * 17.0.4.fx-zulu
 * 11.0.16.fx-zulu
--------------------------------------------------------------------------------
* - installed                                                                   
> - currently in use                                                            
--------------------------------------------------------------------------------


//In online
sdk list java

               |     | 17.0.4.fx    | zulu    | installed  | 17.0.4.fx-zulu      
               |     | 17.0.4.1     | zulu    |            | 17.0.4.1-zulu       
               |     | 17.0.4.1.fx  | zulu    |            | 17.0.4.1.fx-zulu    
               |     | 17.0.3       | zulu    |            | 17.0.3-zulu         
               |     | 17.0.3.fx    | zulu    |            | 17.0.3.fx-zulu      
               |     | 11.0.16      | zulu    |            | 11.0.16-zulu        
               |     | 11.0.16.fx   | zulu    | installed  | 11.0.16.fx-zulu     
               |     | 11.0.16.1    | zulu    |            | 11.0.16.1-zulu      
               |     | 11.0.16.1.fx | zulu    |            | 11.0.16.1.fx-zulu   
               |     | 11.0.15      | zulu    |            | 11.0.15-zulu        
               |     | 11.0.15.fx   | zulu    |            | 11.0.15.fx-zulu     
               |     | 8.0.345      | zulu    |            | 8.0.345-zulu        
               | >>> | 8.0.345.fx   | zulu    | installed  | 8.0.345.fx-zulu   

System info

macOS 12.6
zsh 5.8.1 (x86_64-apple-darwin21.0)
SDKMAN 5.16.0

@4ooc 4ooc added the bug label Sep 21, 2022
@helpermethod
Copy link
Member

Hi @4ooc!

The offline mode works fine for me.

With offline mode

$ sdk list java
--------------------------------------------------------------------------------
Offline: only showing installed java versions
--------------------------------------------------------------------------------
 * 22.2.r17-grl
 * 22.1.0.r17-grl
 * 21.3.2.r17-grl
 > 18.0.2-zulu
 * 17.0.4-zulu
 * 11.0.15-tem
--------------------------------------------------------------------------------
* - installed
> - currently in use
--------------------------------------------------------------------------------

Without offline mode

$ sdk list java | grep installed
 GraalVM       |     | 22.2.r17     | grl     | installed  | 22.2.r17-grl
               |     | 22.1.0.r17   | grl     | installed  | 22.1.0.r17-grl
               |     | 21.3.2.r17   | grl     | installed  | 21.3.2.r17-grl
               |     | 11.0.15      | tem     | installed  | 11.0.15-tem
               | >>> | 18.0.2       | zulu    | installed  | 18.0.2-zulu
               |     | 17.0.4       | zulu    | installed  | 17.0.4-zulu

That said, offline mode is severely limited, and should only be used as a last resort.

Future versions of SDKMAN! may change that, though ;).

4ooc added a commit to 4ooc/sdkman-cli that referenced this issue Sep 23, 2022
@4ooc 4ooc linked a pull request Sep 23, 2022 that will close this issue
4ooc added a commit to 4ooc/sdkman-cli that referenced this issue May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants