commit 139cf98a2b5344ab2fbdec77f0a3ddbe690e7115
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-10T05:32:58Z |
| subject | Fixed gpg-agent not starting sometimes |
commit 139cf98a2b5344ab2fbdec77f0a3ddbe690e7115
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-10T05:32:58Z
Fixed gpg-agent not starting sometimes
---
bash/bashrc/rbashrc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index a08716f..1f7cad8 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -68,7 +68,8 @@ if ! shopt -oq posix; then
fi
fi
-if [ -x "/usr/bin/gpg-agent" ]; then
+which gpg-agent 2>&1 > /dev/null
+if [ $? -eq 0 ]; then
GPG_ENV="$HOME/.gnupg/environment"
function __start_agent {