fix: only export GPG_TTY if gpg is installed

This commit is contained in:
George Rawlinson 2021-07-08 14:33:48 +00:00
parent 7b205e5b2b
commit a9bec11e31
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
1 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,9 @@
# It is important that this environment variable always reflects the out
# put of the tty command.
GPG_TTY=$(tty)
export GPG_TTY
if command -v gpg-agent &> /dev/null; then
GPG_TTY=$(tty)
export GPG_TTY
fi
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2