1
0
Fork 0

gpg module: the original grep expression cannot work on macos, make it simple for checking

pull/1732/head
Vonfry 4 years ago
parent 2fc2920349
commit 4c7ac6ff2e
No known key found for this signature in database
GPG Key ID: 7CEA08AE02E6F76F

@ -22,7 +22,7 @@ source "$_gpg_agent_env" 2> /dev/null
# Start gpg-agent if not started. # Start gpg-agent if not started.
if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then
# Start gpg-agent if not started. # Start gpg-agent if not started.
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q "gpg-agent"; then
mkdir -p "$_gpg_agent_env:h" mkdir -p "$_gpg_agent_env:h"
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")" eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
fi fi

Loading…
Cancel
Save