mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Improved ssh-agent check
The old test does not work if an ssh-agent is running but has no identities loaded. This works and is much cleaner.
This commit is contained in:
parent
d485044169
commit
87f7098dd4
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then
|
|||
# check again if another agent is running using the newly sourced settings
|
||||
if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then
|
||||
# check for existing ssh-agent
|
||||
if ssh-add -l > /dev/null 2> /dev/null; then
|
||||
if [[ -n $SSH_AUTH_SOCK ]]; then
|
||||
# ssh-agent running, start gpg-agent without ssh support
|
||||
start_agent_nossh;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue