path: root/keychain
diff options
authorTom Ryder <tom@sanctum.geek.nz>2017-11-01 13:12:57 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-01 13:12:57 +1300
commit9f07a3d02cb849c27e34a275b2edd1b6f14fe793 (patch)
tree219fca42e4a1e1b4feb751733bbd5252c1f4f11b /keychain
parentBump version number to 0.3.2 (diff)
Always set GPG_TTY regardless of GPG_AGENT_INFO
GnuPG 2.1 no longer sets the GPG_AGENT_INFO variable, making this a poor choice of precondition for setting GPG_TTY: <https://www.gnupg.org/faq/whats-new-in-2.1.html> The manual page for gpg-agent(1) in GnuPG 2.1 says: >You should always add the following lines to your .bashrc or whatever >initialization file is used for all shell invocations: > > GPG_TTY=$(tty) > export GPG_TTY So we'll follow that literally, and just set it every time.
Diffstat (limited to 'keychain')
1 files changed, 1 insertions, 2 deletions
diff --git a/keychain/shrc.d/keychain.sh b/keychain/shrc.d/keychain.sh
index 9a732384..1c0e780e 100644
--- a/keychain/shrc.d/keychain.sh
+++ b/keychain/shrc.d/keychain.sh
@@ -1,4 +1,3 @@
-# If GPG_AGENT_INFO is set, update GPG_TTY for clean use of pinentry(1) etc
-[ -n "$GPG_AGENT_INFO" ] || return
+# Update GPG_TTY for clean use of pinentry(1) etc
GPG_TTY=$(command -p tty) || return
export GPG_TTY