]> git.sev.monster Git - dotfiles.git/commitdiff
zshenv: ignore gpg on systems that don't have it
authorsev <git@sev.monster>
Thu, 8 Oct 2020 14:48:52 +0000 (09:48 -0500)
committersev <git@sev.monster>
Thu, 8 Oct 2020 14:48:52 +0000 (09:48 -0500)
base/.zshenv

index 46b0e662703896389e5ad0116e72992a6b9dff16..8383afb54b7312911911fc635390acb6c3edee0e 100644 (file)
@@ -24,12 +24,14 @@ export PYTHONSTARTUP=~/.pythonrc
 ## perl
 (( ${+commands[perl]} )) && eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5)
 ## gpg
 ## perl
 (( ${+commands[perl]} )) && eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5)
 ## gpg
-export GPG_TTY=$(tty)
-if [[ ! -v SSH_AUTH_SOCK ]] {
-       # set up SSH auth socket and start GPG agent
-       export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
+if (( ${+commands[gpg]} )); {
+       export GPG_TTY=$(tty)
+       if [[ ! -v SSH_AUTH_SOCK ]] {
+               # set up SSH auth socket and start GPG agent
+               export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
+       }
+       gpg-connect-agent updatestartuptty /bye >/dev/null
 }
 }
-gpg-connect-agent updatestartuptty /bye >/dev/null
 
 ### freebsd
 if [[ "$OSTYPE" =~ "^freebsd" ]] {
 
 ### freebsd
 if [[ "$OSTYPE" =~ "^freebsd" ]] {
This page took 0.037042 seconds and 4 git commands to generate.