silence error message before agent is installed

This commit is contained in:
Jeffrey Paul 2016-10-19 21:39:18 -04:00
parent e0bd35a838
commit da57864f88

View File

@ -9,13 +9,15 @@ ssh-add -L 2>/dev/null >/dev/null || rm -f $HOME/.gpg-agent-info
# if no info file, start up potentially-new, working agent
if [[ ! -e $HOME/.gpg-agent-info ]]; then
gpg-agent \
--enable-ssh-support \
--daemon \
--write-env-file \
--use-standard-socket \
--pinentry-program $(brew --prefix)/bin/pinentry-mac \
2>&1 >/dev/null
if which gpg-agent 2>&1 >/dev/null ; then
gpg-agent \
--enable-ssh-support \
--daemon \
--write-env-file \
--use-standard-socket \
--pinentry-program $(brew --prefix)/bin/pinentry-mac \
2>&1 >/dev/null
fi
fi
# load up new agent info