make sure the shims folder is appended to path only once

This commit is contained in:
Lucas Vasconcelos 2020-08-11 20:11:24 -03:00
parent cc929d2fdf
commit 22d79ae121

View File

@ -1,10 +1,13 @@
set -x ASDF_DIR (dirname (status -f))
set -l asdf_data_dir (
if test -n "$ASDF_DATA_DIR"; echo $ASDF_DATA_DIR;
else; echo $HOME/.asdf; end)
if test -n $ASDF_DATA_DIR
set -l asdf_user_shims $ASDF_DATA_DIR/shims
else
set -l asdf_user_shims $HOME/.asdf
end
# Add asdf to PATH
set -l asdf_bin_dirs $ASDF_DIR/bin $ASDF_DIR/shims $asdf_data_dir/shims
set -l asdf_bin_dirs $ASDF_DIR/bin $asdf_user_shims
for x in $asdf_bin_dirs
if test -d $x