Check if gpgconf exists before trying to run it

This commit is contained in:
Adam Goldsmith 2023-08-11 17:08:08 -04:00
parent 30627b531b
commit 29f1b87f59

View File

@ -39,6 +39,7 @@ fi
# Set SSH auth socket
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
if hash gpgconf 2>/dev/null && [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]]
then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi