2c87f85ad56663c322f6a72f4ef6ad70b74c8aad

Author
Paweł Czochański <czochanski@gmail.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Fix wrong $GNUPGHOME usage in gpg-agent plugin (#6403)

$GNUPGHOME variable was used incorrectly and caused a grep error when
set.

Diff

 1diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh
 2index 0bf65d58f29c840ae61e7afafbd24bde80e8bedf..69e239ccf6214e3a58baf0904a4076e7519052b0 100644
 3--- a/plugins/gpg-agent/gpg-agent.plugin.zsh
 4+++ b/plugins/gpg-agent/gpg-agent.plugin.zsh
 5@@ -6,7 +6,7 @@ if [ ! -S $GPG_AGENT_SOCKET ]; then
 6 fi
 7 
 8 # Set SSH to use gpg-agent if it is configured to do so
 9-GNUPGCONFIG=${GNUPGHOME:-"$HOME/.gnupg/gpg-agent.conf"}
10+GNUPGCONFIG="${GNUPGHOME:-"$HOME/.gnupg"}/gpg-agent.conf"
11 if [ -r "$GNUPGCONFIG" ] && grep -q enable-ssh-support "$GNUPGCONFIG"; then
12   unset SSH_AGENT_PID
13   export SSH_AUTH_SOCK=$GPG_AGENT_SOCKET