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

View file

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