From c96fc233c4903ba75fba5bc55e7f91f9dc8e460e Mon Sep 17 00:00:00 2001 From: Wayne Lloyd Date: Fri, 18 Mar 2022 12:11:00 +0000 Subject: [PATCH] fix(gpg-agent): suppress errors from `gpgconf` (#10769) --- plugins/gpg-agent/gpg-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 0adc8de5d..1f4be20b0 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -9,7 +9,7 @@ autoload -U add-zsh-hook add-zsh-hook preexec _gpg-agent_update-tty_preexec # If enable-ssh-support is set, fix ssh agent integration -if [[ $(gpgconf --list-options gpg-agent | awk -F: '$1=="enable-ssh-support" {print $10}') = 1 ]]; then +if [[ $(gpgconf --list-options gpg-agent 2>/dev/null | awk -F: '$1=="enable-ssh-support" {print $10}') = 1 ]]; then unset SSH_AGENT_PID if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]]; then export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"