From 139cf98a2b5344ab2fbdec77f0a3ddbe690e7115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Wed, 10 Aug 2022 13:32:58 +0800 Subject: [PATCH] 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 {