Added flag so .bash_logout won't try to unregister a socket that didn't register.

This commit is contained in:
Darren 'Tadgy' Austin 2019-07-02 22:04:33 +01:00
commit dae5b0fdaa
3 changed files with 7 additions and 5 deletions

View file

@ -18,7 +18,7 @@ hash ssh-add ssh-agent >/dev/null 2>&1 && {
_PLATFORM="$(uname -s)"
# Remove the SSH_AUTH_SOCK from the agents file.
[[ ! -z "$SSH_AUTH_SOCK" ]] && {
[[ ! -z "$SSH_AUTH_SOCK" ]] && (( ${_SSH_AGENT_REG_FAILED:-0} == 0 )) && {
_lock_agents_file && {
_pop_agent_sock || {
echo -e "$(tput setaf 1 || tput AF 1)Failed to clean up agents file!$(tput op)"