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

Loses all candidates upon upgrade #1

Open
jwadamson opened this issue Apr 3, 2023 · 3 comments
Open

Loses all candidates upon upgrade #1

jwadamson opened this issue Apr 3, 2023 · 3 comments

Comments

@jwadamson
Copy link

I just upgraded a homebrew-based installation of sdkman. I was shocked to find my installed candidates had been deleted and my development environment was broken until I manually issued the sdkman commands to reinstall them.

Is there a way to store the installed software in a version-independent location outside of the homebrew Cellar version specific directory?

@helpermethod
Copy link
Member

helpermethod commented Apr 4, 2023

Hi @jwadamson,

thanks for reporting, that is indeed a problem.

I think you can work around this if you set SDKMAN_CANDIDATES_DIR to an existing directory of your choice.

I'm currently on holiday but will fix the formula at the end of the next week.

EDIT This seems to be a little bit harder than I initially thought. The candidates directory is currently linked to the directory where SDKMAN! is placed. We probably need to split those two.

@jwadamson
Copy link
Author

Thank you for looking into this. I had seen the SDKMAN_CANDIDATES_DIR env var, but it looked like it is not set up as being intended to be overridden prior to calling the init script so I wasn't sure what sort of side effects that would have.

@agsimeonov
Copy link

For now I have used:
brew pin sdkman-cli

And then enabled selfupdate via sdkman_selfupdate_feature=true after running
sdk config

And to update using:
sdk selfupdate

I would love this resolved too so I don't have to go through this workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants