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 if [ -d "$HOME/.profile.d" ]; then
for pd in "$HOME/.profile.d"/*; do for pd in "$HOME/.profile.d"/*; do

View file

@ -16,7 +16,6 @@ export PATH="$HOME/Library/Python/3.12/bin:$HOME/Library/Python/3.11/bin:$HOME/p
export PERL5LIB="$HOME/perl5/lib/perl5:$PERL5LIB" export PERL5LIB="$HOME/perl5/lib/perl5:$PERL5LIB"
eval $(ssh-agent) eval $(ssh-agent)
. "$HOME/.cargo/env"
alias ls='ls -G' alias ls='ls -G'