mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Update how we set SSH_AUTH_SOCK.
This commit is contained in:
@@ -20,13 +20,19 @@ fi
|
||||
# Inform gpg-agent of the current TTY for user prompts.
|
||||
export GPG_TTY="$(tty)"
|
||||
|
||||
# Integrate with the SSH module.
|
||||
# Setup SSH agent support
|
||||
if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
||||
# Load required functions.
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Override the ssh-agent environment file default path.
|
||||
_ssh_agent_env="$_gpg_agent_env"
|
||||
if test -z "$SSH_AUTH_SOCK" ; then
|
||||
SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
|
||||
if test -S "$SSH_AUTH_SOCK" ; then
|
||||
export SSH_AUTH_SOCK
|
||||
else
|
||||
unset SSH_AUTH_SOCK
|
||||
fi
|
||||
fi
|
||||
|
||||
# Updates the GPG-Agent TTY before every command since SSH does not set it.
|
||||
function _gpg-agent-update-tty {
|
||||
|
||||
Reference in New Issue
Block a user