From 5859c1c7ffb8246efee7c0fd3db0f443f1bc80f5 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Wed, 6 Jul 2022 21:42:59 -0400 Subject: Check if keys exist before calling keychain --- dot_zshrc.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dot_zshrc.tmpl') diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 5169add..09cc74c 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -646,7 +646,7 @@ NO_verbose \ # GPG / SSH AGENT -if command -v keychain > /dev/null; then +if command -v keychain > /dev/null && test -d ~/.ssh/keys/{{ .chezmoi.hostname }}; then ls ~/.ssh/keys/{{ .chezmoi.hostname }}/id_* | egrep -v '\.pub$' | xargs keychain [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n` [ -f $HOME/.keychain/$HOSTNAME-sh ] && -- cgit v1.2.3