mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
Don't clobber ssh-agent
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Custom agent to handle gpg-agent 2.1
|
||||
# Custom plugin to handle gpg-agent 2.1
|
||||
|
||||
local GPG_ENV=$HOME/.gnupg/gpg-agent.env
|
||||
|
||||
@@ -18,12 +18,13 @@ function start_agent_withssh {
|
||||
|
||||
if [ -z "${GPG_AGENT_INFO}" ] ; then
|
||||
if which gpgconf >/dev/null 2>&1 ; then
|
||||
# This might clobber SSH_AUTH_SOCK anyway...
|
||||
GPG_AGENT_INFO=$(gpgconf --list-dirs agent-socket)
|
||||
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
export GPG_AGENT_INFO
|
||||
if [ -z "${SSH_AUTH_SOCK}" ] ; then
|
||||
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# check if another agent is running
|
||||
|
||||
Reference in New Issue
Block a user