Only start agent when status is interactive

This commit is contained in:
mmill
2022-12-01 23:49:23 +01:00
committed by GitHub
parent fd70a2afdd
commit 4606e3428d

View File

@@ -1,7 +1,9 @@
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if status is-interactive
if test -z "$SSH_ENV"
set -xg SSH_ENV $HOME/.ssh/environment
end
if not __ssh_agent_is_started
__ssh_agent_start
if not __ssh_agent_is_started
__ssh_agent_start
end
end