diff options
author | Wayne Lloyd <waynelloyd@outlook.com> | 2022-03-18 12:11:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 13:11:00 +0100 |
commit | c96fc233c4903ba75fba5bc55e7f91f9dc8e460e (patch) | |
tree | a55330a14e90ced2d9d0de0890d1e060200e00e8 /plugins/gpg-agent/gpg-agent.plugin.zsh | |
parent | f0b5cb133063b16c25afd8740a0c96ca884ee822 (diff) | |
download | zsh-c96fc233c4903ba75fba5bc55e7f91f9dc8e460e.tar.gz zsh-c96fc233c4903ba75fba5bc55e7f91f9dc8e460e.tar.bz2 zsh-c96fc233c4903ba75fba5bc55e7f91f9dc8e460e.zip |
fix(gpg-agent): suppress errors from `gpgconf` (#10769)
Diffstat (limited to 'plugins/gpg-agent/gpg-agent.plugin.zsh')
-rw-r--r-- | plugins/gpg-agent/gpg-agent.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
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)" |