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

Account for SDKMAN! being installed at custom path #34

Closed
avierr opened this issue May 14, 2020 · 5 comments
Closed

Account for SDKMAN! being installed at custom path #34

avierr opened this issue May 14, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@avierr
Copy link

avierr commented May 14, 2020

I usually have sdkman installer in /Users/Shared/sdkman directory so that two user can share the same sdkman instance.

I only have to set the sdkman path in my profile/rc file per user.

but seems like variable is hardcoded,

set __fish_sdkman_init "$HOME/.sdkman/bin/sdkman-init.sh"

@reitzig
Copy link
Owner

reitzig commented May 14, 2020

You mean we should use SDKMAN_DIR instead? That makes sense to me, but I'd have to look at it more closely to not break the case where sdkman-for-fish installs sdkman.

FWIW, I think this is a new feature in SDKMAN! 5.8.x; cf. #35

@reitzig reitzig added the enhancement New feature or request label May 14, 2020
@reitzig reitzig changed the title all sdkman installed in different path Account for SDKMAN! being installed at custom path Jun 1, 2020
@tmysik
Copy link

tmysik commented Jul 2, 2020

I just needed to workaround this by setting set -g __fish_sdkman_init "/my/path/to/sdkman/bin/sdkman-init.sh" in ~/.config/fish/config.fish. Seems to be working fine.

Note: I have installed SDKMAN! (in my custom directory) before sdkman-for-fish and it wanted me to download and install it again.

@reitzig
Copy link
Owner

reitzig commented Jul 2, 2020

Thanks! I figured it should be that simple, but I'll have to figure out how to handle

  • not knowing SDKMAN_DIR without running it first (critical), and
  • installing it to a custom location (nice to have).

Maybe it'll have to be an (optional) setting with HOME as the default, but I would prefer to have an automatism.

@tmysik
Copy link

tmysik commented Jul 2, 2020

@reitzig Maybe it could be interactive? Now, you are checking some variable and do installation if not set. What if you asked user what to do, whether SDKMAN! was already installed, etc. if such a variable is not set?

@reitzig reitzig self-assigned this Feb 24, 2021
reitzig added a commit that referenced this issue Jun 26, 2023
reitzig added a commit that referenced this issue Jun 26, 2023
@reitzig
Copy link
Owner

reitzig commented Jun 26, 2023

It'll be like this: If globale fish variable __sdkman_custom_dir is set, we will respect its value.

That is, if you have a custom installation, add

set -g __sdkman_custom_dir /your/path

to .config/fish/conf.d/config_sdk.fish.

cf. corner_cases.feature#14

Sorry for the long wait, but it's done now! 🙃

@reitzig reitzig closed this as completed Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants