mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-27 21:58:11 -07:00
Re-initialize if current user changed.
Fixes issue #25; assumes that every user has their own SDKMAN installation.
This commit is contained in:
parent
083d2d3d9b
commit
dccaf0056c
1 changed files with 4 additions and 3 deletions
|
@ -74,9 +74,10 @@ function __fish_sdkman_run_in_bash
|
||||||
return $sdkStatus
|
return $sdkStatus
|
||||||
end
|
end
|
||||||
|
|
||||||
# If this is a subshell of a(n initialized) fish, no initialization
|
# If this is a subshell of a(n initialized) fish owned by the same user,
|
||||||
# necessary. Otherwise:
|
# no initialization necessary.
|
||||||
if not set -q SDKMAN_DIR
|
# Otherwise:
|
||||||
|
if not set -q SDKMAN_DIR; or test (stat -c "%U" $SDKMAN_DIR) != (whoami)
|
||||||
__fish_sdkman_run_in_bash "source $__fish_sdkman_init"
|
__fish_sdkman_run_in_bash "source $__fish_sdkman_init"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue