From b98ebda7d17758c9930ef07e7af8f2daafb80295 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Thu, 16 Sep 2021 21:53:50 +0200 Subject: [PATCH] [ZSH] Load GUIX profile only if its available --- shells/zshrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/shells/zshrc b/shells/zshrc index 3c27e73..ffbc1f8 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -147,6 +147,16 @@ export GOPATH=$HOME/projects/go GUIX_PROFILE="$HOME/.guix-profile/" GUIX_LOCPATH="$GUIX_PROFILE/lib/locale/" -. "$GUIX_PROFILE/etc/profile" + +if [[ -d $GUIX_PROFILE ]]; +then + . "$GUIX_PROFILE/etc/profile" +fi + GUIX_PROFILE="$HOME/.config/guix/current" -. "$GUIX_PROFILE/etc/profile" + +if [[ -d $GUIX_PROFILE ]]; +then + . "$GUIX_PROFILE/etc/profile" +fi +