diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-12-24 11:38:34 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-12-24 11:38:34 +0100 |
commit | 8b326ddc8db2e1271917ef47470a4b2cead7ceff (patch) | |
tree | ea7f97ebc327b016e9c57d49d32ae1ab5da496a0 /src | |
parent | 1057be995c9c850a39eb1044a264168be052064e (diff) | |
download | pass-8b326ddc8db2e1271917ef47470a4b2cead7ceff.tar.gz pass-8b326ddc8db2e1271917ef47470a4b2cead7ceff.tar.bz2 pass-8b326ddc8db2e1271917ef47470a4b2cead7ceff.zip |
Keep track of correct TTY for pinentry at start of script, in case we take over stdin later.
Diffstat (limited to '')
-rwxr-xr-x | src/password-store.sh | 1 |
1 files changed, 1 insertions, 0 deletions
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" ) |