diff --git a/source/gpg.zsh b/source/gpg.zsh index 8c1a33d..fcefeb5 100644 --- a/source/gpg.zsh +++ b/source/gpg.zsh @@ -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