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

Allow users to customize directories (cache, runtime) #659

Open
1 of 2 tasks
geowarin opened this issue Jul 2, 2018 · 8 comments
Open
1 of 2 tasks

Allow users to customize directories (cache, runtime) #659

geowarin opened this issue Jul 2, 2018 · 8 comments

Comments

@geowarin
Copy link

geowarin commented Jul 2, 2018

Please tick one:

Please explain the Issue / Feature Request here:

The way skdman manages its directories is non-standard.

I would be great to allow users to customize the directories used by the tool through environment variables.

I think most users (including me) would want keep the sources of the tool (src, bin, var) separated from the cache (candidates, tmp, archives).

A good starting point could be supporting SDKMAN_HOME and SKMAN_CACHE.

Another thing we could support is something more standard like the xdg basedir spec.

We probably have to think about migration strategy or graceful error handling when those directories are updated after the install.

@marc0der
Copy link
Member

@soc
Copy link

soc commented Dec 10, 2018

@marc0der I'm the author of https://github.com/soc/directories-jvm, a library that helps applications pick the right paths on Linux, macOS, BSD, Windows, Redox ... maybe this would be an option for you?

The Coursier dependency manager has been successfully using the library for a while already and migrated their directory structure to it, as far as I know without any major hickups. The native versions of the library have been downloaded 130.000 in the last 90 days, so I believe the library is rather reliable.

@marc0der
Copy link
Member

@soc It looks very cool indeed, although unfortunately sdkman's CLI is written in bash (and being ported to Go atm).

@soc
Copy link

soc commented Dec 10, 2018

@marc0der Then using the native version should make more sense I guess. :-)
(Haven't investigated how calling native code works in Go.)

@Scuilion
Copy link

I'd like to second the vote for using XDG basedir spec.

@weilbith
Copy link

weilbith commented Apr 6, 2022

Got this ever worked on?

@untainsYD
Copy link

I do support this issue. It is quite annoying that the ~/.sdkmanrc file is created in the home directory.

@soc
Copy link

soc commented Oct 20, 2023

What some projects have found helpful is to introduce some command in the CLI like skd dirs or sdk dirs cache/skd dirs config/... that prints out the directory sdkman intends to use and that other tools can rely on, instead of hard-coding assumptions into their tools.

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

6 participants