fix: Respect globally set SDKMAN_DIR

Also, print a warning during shell startup
if a custom install path is set, but
SDKMAN! is not installed there.

fixes #52
This commit is contained in:
Raphael Reitzig 2024-04-03 23:35:59 +02:00 committed by Raphael
parent 5f2ae91d5f
commit a0aa142288
5 changed files with 43 additions and 25 deletions

View file

@ -27,14 +27,17 @@ _Note:_
- Only compatible with fisher v4 upwards; v3 is no longer supported.
- You have to install [SDKMAN!] separately.
- If you have installed SDKMAN! at a custom location, you need to add
```fish
set -g __sdkman_custom_dir /your/path/to/sdkman
```
to a fish config file
[run _before_](https://fishshell.com/docs/current/language.html#configuration-files)
`.config/fish/conf.d/sdk.fish`;
for example, you can use `.config/fish/conf.d/config_sdk.fish`.
- If you have installed SDKMAN! at a custom location, you need to either
- set environment variable `SDKMAN_DIR` to that path using your preferred method, or
- add
```fish
set -g __sdkman_custom_dir /your/path/to/sdkman
```
to a fish config file
[run _before_](https://fishshell.com/docs/current/language.html#configuration-files)
`.config/fish/conf.d/sdk.fish`;
for example, you can use `.config/fish/conf.d/config_sdk.fish`.
- If _both_ are set, `__sdkman_custom_dir` is used.
## Usage