From 009b78b1aa98098928236d173e5743da90e3a239 Mon Sep 17 00:00:00 2001 From: Piotr Radosz Date: Sun, 19 Nov 2017 15:47:16 +0100 Subject: [PATCH] Fix gpg-agent plugin for environments not using XDG_RUNTIME_DIR --- plugins/gpg-agent/gpg-agent.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 69e239ccf..32a4c961a 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -1,5 +1,7 @@ +#Define GPG_AGENT_SOCKET +GPG_AGENT_SOCKET=`gpgconf --list-dirs agent-ssh-socket` + # Enable gpg-agent if it is not running -GPG_AGENT_SOCKET="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" if [ ! -S $GPG_AGENT_SOCKET ]; then gpg-agent --daemon >/dev/null 2>&1 export GPG_TTY=$(tty)