From 2a2f8ecb67674538b4b267f0796673f779f0ae5d Mon Sep 17 00:00:00 2001 From: flyingpeakock Date: Fri, 27 Sep 2024 09:40:15 +0000 Subject: [PATCH] fix(ssh-agent): use termux prefix for tmp (#12695) --- plugins/ssh-agent/ssh-agent.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 35d06384d..83548648b 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -100,7 +100,11 @@ function _add_identities() { if zstyle -t :omz:plugins:ssh-agent agent-forwarding \ && [[ -n "$SSH_AUTH_SOCK" ]]; then if [[ ! -L "$SSH_AUTH_SOCK" ]]; then - ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USERNAME-screen + 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