From e8f8745068b679fcc69941990a6358e37f6d4f87 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Wed, 29 Nov 2023 11:48:55 +0100 Subject: [PATCH] bashrc: Check if cargo env files exists before sourcing it --- shell/bash/.bashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/bash/.bashrc b/shell/bash/.bashrc index 6f67742..8f16977 100755 --- a/shell/bash/.bashrc +++ b/shell/bash/.bashrc @@ -34,7 +34,10 @@ if test -d "$FNM_PATH" ; then eval "$(fnm env --use-on-cd)" 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 eval "$(starship init bash)"