bashrc: Check if cargo env files exists before sourcing it

This commit is contained in:
GaspardCulis 2023-11-29 11:48:55 +01:00
parent ef53ad4e37
commit e8f8745068

View file

@ -34,7 +34,10 @@ if test -d "$FNM_PATH" ; then
eval "$(fnm env --use-on-cd)" eval "$(fnm env --use-on-cd)"
fi fi
. "$HOME/.cargo/env" CARGO_ENV_PATH="$HOME/.cargo/env"
if [ -f "$CARGO_ENV_PATH" ]; then
. "$CARGO_ENV_PATH"
fi
if command -v starship > /dev/null; then if command -v starship > /dev/null; then
eval "$(starship init bash)" eval "$(starship init bash)"