From b2706dbd0e4326b6eb39d882caff93f4845688f7 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 15 May 2019 10:58:02 +0200 Subject: zshrc: Guard ruby gems PATH Signed-off-by: Florian Pritz --- .zshrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.zshrc b/.zshrc index 30e8af3..91222a6 100644 --- a/.zshrc +++ b/.zshrc @@ -12,10 +12,12 @@ if [[ $TERM = "xterm-termite" ]]; then export TERM=xterm-256color fi -# ruby gems -for _dir in $HOME/.gem/ruby/*/bin; do - export PATH=$_dir:$PATH -done +if [[ -e "$HOME/.gem/" ]]; then + # ruby gems + for _dir in $HOME/.gem/ruby/*/bin; do + export PATH=$_dir:$PATH + done +fi # add extra dirs/symlinks to path. allows to separate script bundles into dirs for _dir in $HOME/bin/extra/*(/N,@N); do -- cgit v1.2.3-24-g4f1b