From c76c25186769f3c795bd17c87be5bd2392928e5a Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 25 Dec 2019 14:39:50 -0500 Subject: [PATCH] Only launch agent if .ssh exists --- bash_aliases.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bash_aliases.sh b/bash_aliases.sh index 6c1112f..a4e7eb6 100644 --- a/bash_aliases.sh +++ b/bash_aliases.sh @@ -9,9 +9,8 @@ export EDITOR='vim -X' sock_proxy=$HOME/.ssh/ssh_auth_sock if [ -S "$(readlink $sock_proxy)" ]; then export SSH_AUTH_SOCK=$sock_proxy -else +elif [[ -d $HOME/.ssh ]]; then ( - set -x eval `ssh-agent -s` ln -f --symbolic "$SSH_AUTH_SOCK" "$sock_proxy" ssh-add