Unverified Commit c96fc233 authored by Wayne Lloyd's avatar Wayne Lloyd Committed by GitHub

fix(gpg-agent): suppress errors from `gpgconf` (#10769)

parent f0b5cb13
......@@ -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)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment