Wrap ssh auth sock set in conditional to prevent early exits.
This commit is contained in:
4
.bashrc
4
.bashrc
@ -126,7 +126,9 @@ if [ -z "$(pgrep ssh-agent)" ]; then
|
|||||||
else
|
else
|
||||||
# Set pid + auth sock to ensure existing ssh-agent will be re-used
|
# Set pid + auth sock to ensure existing ssh-agent will be re-used
|
||||||
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
export SSH_AGENT_PID=$(pgrep ssh-agent)
|
||||||
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
|
if [ -d "/tmp/ssh" ]; then
|
||||||
|
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If ssh-agent has no identities, add mine
|
# If ssh-agent has no identities, add mine
|
||||||
|
|||||||
Reference in New Issue
Block a user