summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Czochański <czochanski@gmail.com>2017-11-08 23:02:38 +0100
committerRobby Russell <robby@planetargon.com>2017-11-08 14:02:38 -0800
commit2c87f85ad56663c322f6a72f4ef6ad70b74c8aad (patch)
treedd2d08fa18799026afa594f7843e2380f1c23dfe
parent7a7480b987c00bd916e2abf7179f92164ac44362 (diff)
downloadzsh-2c87f85ad56663c322f6a72f4ef6ad70b74c8aad.tar.gz
zsh-2c87f85ad56663c322f6a72f4ef6ad70b74c8aad.tar.bz2
zsh-2c87f85ad56663c322f6a72f4ef6ad70b74c8aad.zip
Fix wrong $GNUPGHOME usage in gpg-agent plugin (#6403)
$GNUPGHOME variable was used incorrectly and caused a grep error when set.
-rw-r--r--plugins/gpg-agent/gpg-agent.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh
index 0bf65d58f..69e239ccf 100644
--- a/plugins/gpg-agent/gpg-agent.plugin.zsh
+++ b/plugins/gpg-agent/gpg-agent.plugin.zsh
@@ -6,7 +6,7 @@ if [ ! -S $GPG_AGENT_SOCKET ]; then
fi
# Set SSH to use gpg-agent if it is configured to do so
-GNUPGCONFIG=${GNUPGHOME:-"$HOME/.gnupg/gpg-agent.conf"}
+GNUPGCONFIG="${GNUPGHOME:-"$HOME/.gnupg"}/gpg-agent.conf"
if [ -r "$GNUPGCONFIG" ] && grep -q enable-ssh-support "$GNUPGCONFIG"; then
unset SSH_AGENT_PID
export SSH_AUTH_SOCK=$GPG_AGENT_SOCKET