From 8b326ddc8db2e1271917ef47470a4b2cead7ceff Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 24 Dec 2014 11:38:34 +0100 Subject: Keep track of correct TTY for pinentry at start of script, in case we take over stdin later. --- src/password-store.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/password-store.sh b/src/password-store.sh index d44b005..1bf6306 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -8,6 +8,7 @@ set -o pipefail GPG_OPTS=( "--quiet" "--yes" "--compress-algo=none" ) GPG="gpg" +export GPG_TTY="${GPG_TTY:-$(tty 2>/dev/null)}" which gpg2 &>/dev/null && GPG="gpg2" [[ -n $GPG_AGENT_INFO || $GPG == "gpg2" ]] && GPG_OPTS+=( "--batch" "--use-agent" ) -- cgit v1.2.3