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.
This commit is contained in:
parent
c3b072eace
commit
504c32fa6e
@ -1,5 +1,5 @@
|
|||||||
# Enable gpg-agent if it is not running
|
# 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
|
if [ ! -S $GPG_AGENT_SOCKET ]; then
|
||||||
gpg-agent --daemon >/dev/null 2>&1
|
gpg-agent --daemon >/dev/null 2>&1
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
Loading…
Reference in New Issue
Block a user