From 1d98e95dca6eae91c045ba3ca059e332d12be9db Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 26 Jun 2022 09:51:44 -0400 Subject: [PATCH] Added checks for if-exists for cargo and linuxbrew --- .zshenv | 5 ++++- .zshrc | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.zshenv b/.zshenv index e767314..c72e285 100644 --- a/.zshenv +++ b/.zshenv @@ -7,4 +7,7 @@ : ${ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim} # }}} End configuration added by Zim install -. "$HOME/.cargo/env" +if [[ -d "$HOME/.cargo" ]]; then + . "$HOME/.cargo/env" +fi + diff --git a/.zshrc b/.zshrc index d420a76..f612c75 100644 --- a/.zshrc +++ b/.zshrc @@ -123,7 +123,9 @@ bindkey -M vicmd 'j' history-substring-search-down # }}} End configuration added by Zim install # Homebrew -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +if [[ -d "/home/linuxbrew/.linuxbrew" ]]; then + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +fi # Set Path: typeset -U PATH