mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 09:49:08 +00:00 
			
		
		
		
	gpg: potential fix for #1252
This commit is contained in:
		@@ -14,11 +14,11 @@ fi
 | 
				
			|||||||
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
 | 
					_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
 | 
				
			||||||
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
 | 
					_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Start gpg-agent if not started.
 | 
					# Load environment variables from previous run
 | 
				
			||||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; then
 | 
					 | 
				
			||||||
  # Export environment variables.
 | 
					 | 
				
			||||||
source "$_gpg_agent_env" 2> /dev/null
 | 
					source "$_gpg_agent_env" 2> /dev/null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Start gpg-agent if not started.
 | 
				
			||||||
 | 
					if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; 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 -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
 | 
				
			||||||
    eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
 | 
					    eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user