Set _PLATFORM in agent_prompt_command. Unlock agents file.

This commit is contained in:
Darren 'Tadgy' Austin 2019-07-02 04:31:07 +01:00
commit 4afcb51b3b

View file

@ -1,7 +1,7 @@
# Functions.
_agent_prompt_command() {
hash ssh-add >/dev/null 2>&1 && {
local OUTPUT SOCK
local OUTPUT SOCK _PLATFORM="$(uname -s)"
declare -g _SSH_PROMPT_ERROR_ISSUED
# Check the ssh agent socket is still alive.
# Need to work around an ssh-add bug here: ssh-add doesn't always return 2 on failure
@ -19,6 +19,7 @@ _agent_prompt_command() {
echo "Connected to, but failed to register, alternate ssh-agent - you may need to re-add keys."
fi
}
_unlock_agents_file
_SSH_PROMPT_ERROR_ISSUED=0
else
if [[ -z "$(egrep -v '^$' ~/.ssh/agents)" ]]; then
@ -38,7 +39,6 @@ _agent_prompt_command() {
else
_SSH_PROMPT_ERROR_ISSUED=0
fi
# unset SOCK
}
}