From 050492f1850f62fd7e2625e69146ef8292d88a97 Mon Sep 17 00:00:00 2001 From: xenua Date: Tue, 23 Nov 2021 09:16:34 +0100 Subject: [PATCH] feat: only run gpg ssh init on systems where it is present --- runcoms/zshrc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runcoms/zshrc b/runcoms/zshrc index 47da50a..3654b9b 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -11,9 +11,11 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then fi # Customize to your needs... -export GPG_TTY="$(tty)" -export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" -gpg-connect-agent updatestartuptty /bye > /dev/null +if type gpg-connect-agent > /dev/null; then + export GPG_TTY="$(tty)" + export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" + gpg-connect-agent updatestartuptty /bye > /dev/null +fi function mkcd() { mkdir $1 && cd $1 };