mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-27 21:58:11 -07:00
Fix reinitialization test.
This commit is contained in:
parent
04a8c8574a
commit
415c2a0bb2
2 changed files with 12 additions and 11 deletions
|
@ -78,6 +78,7 @@ end
|
||||||
# no initialization necessary.
|
# no initialization necessary.
|
||||||
# Otherwise:
|
# Otherwise:
|
||||||
if not set -q SDKMAN_DIR; or test (stat -c "%U" $SDKMAN_DIR) != (whoami)
|
if not set -q SDKMAN_DIR; or test (stat -c "%U" $SDKMAN_DIR) != (whoami)
|
||||||
|
set -e SDKMAN_DIR
|
||||||
__fish_sdkman_run_in_bash "source $__fish_sdkman_init"
|
__fish_sdkman_run_in_bash "source $__fish_sdkman_init"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
set SDKMAN_DIR "/" # belongs to root, who hopefully doesn't run this
|
set -x SDKMAN_DIR "/" # belongs to root, who hopefully doesn't run this
|
||||||
set in_new_shell (fish -lc 'echo $SDKMAN_DIR')
|
set in_new_shell (fish -lc 'echo $SDKMAN_DIR')
|
||||||
if [ "$in_new_shell" != "$proper_value" ]
|
if [ "$in_new_shell" != "$proper_value" ]
|
||||||
echo "SDKMAN_DIR reinitialized to $in_new_shell instead of $proper_value"
|
echo "SDKMAN_DIR reinitialized to $in_new_shell instead of $proper_value"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue