diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 3e6a34f42..50d3a1456 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -27,7 +27,7 @@ if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then # check again if another agent is running using the newly sourced settings if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then # check for existing ssh-agent - if ssh-add -l > /dev/null 2> /dev/null; then + if [[ -n $SSH_AUTH_SOCK ]]; then # ssh-agent running, start gpg-agent without ssh support start_agent_nossh; else