浏览代码

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

$GNUPGHOME variable was used incorrectly and caused a grep error when
set.
Paweł Czochański 7 年之前
父节点
当前提交
2c87f85ad5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/gpg-agent/gpg-agent.plugin.zsh

+ 1 - 1
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