profile: More robust handling of user's cargo PATH

This commit is contained in:
Andrea Rogers 2024-10-22 12:41:12 -05:00
commit 4aa7d0603d
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,8 @@
[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
if [ -f "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env"
elif [ -d "$HOME/.cargo/bin" ]; then
PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "$HOME/.profile.d" ]; then
for pd in "$HOME/.profile.d"/*; do