From 504c32fa6e48b1ac4e187430fbcaf4f195259e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jan=20Czocha=C5=84ski?= Date: Thu, 11 Jan 2018 17:30:28 +0100 Subject: [PATCH] Fix MacOS compatibility of the gpg-agent plugin MacOS holds the GPG agent socket in a different directory than Linux-based systems. Asking gpgconf for the correct path is the most straightforward approach to fix this problem. --- 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 69e239cc..0827a489 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -1,5 +1,5 @@ # Enable gpg-agent if it is not running -GPG_AGENT_SOCKET="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" +GPG_AGENT_SOCKET="$(gpgconf --list-dirs agent-ssh-socket)" if [ ! -S $GPG_AGENT_SOCKET ]; then gpg-agent --daemon >/dev/null 2>&1 export GPG_TTY=$(tty)