fix ssh-agent plugin trying to create link to /tmp in termux

This commit is contained in:
Philip Johansson 2024-09-25 09:46:14 +02:00
commit a17689408d

View file

@ -100,7 +100,11 @@ function _add_identities() {
if zstyle -t :omz:plugins:ssh-agent agent-forwarding \ if zstyle -t :omz:plugins:ssh-agent agent-forwarding \
&& [[ -n "$SSH_AUTH_SOCK" ]]; then && [[ -n "$SSH_AUTH_SOCK" ]]; then
if [[ ! -L "$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 fi
else else
_start_agent _start_agent