issue #29: Replace stat with something more portable.

cf. https://unix.stackexchange.com/a/7732/17409
This commit is contained in:
Raphael Reitzig 2019-07-31 02:09:47 +02:00
parent b1887e4170
commit 12f7d3de77

View file

@ -77,7 +77,7 @@ end
# If this is a subshell of a(n initialized) fish owned by the same user,
# no initialization necessary.
# Otherwise:
if not set -q SDKMAN_DIR; or test (stat -c "%U" $SDKMAN_DIR) != (whoami)
if not set -q SDKMAN_DIR; or test (ls -ld "$SDKMAN_DIR" | awk '{print $3}') != (whoami)
__fish_sdkman_run_in_bash "source $__fish_sdkman_init"
end