fix(ssh-agent): use termux prefix for tmp ()

This commit is contained in:
flyingpeakock 2024-09-27 09:40:15 +00:00 committed by GitHub
parent c1679a12f8
commit 2a2f8ecb67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,8 +100,12 @@ function _add_identities() {
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
&& [[ -n "$SSH_AUTH_SOCK" ]]; then
if [[ ! -L "$SSH_AUTH_SOCK" ]]; then
if [[ -n "$TERMUX_VERSION" ]]; then
ln -sf "$SSH_AUTH_SOCK" "$PREFIX"/tmp/ssh-agent-$USERNAME-screen
else
ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen
fi
fi
else
_start_agent
fi