Unverified Commit 0da41698 authored by Vishal Sharma's avatar Vishal Sharma Committed by GitHub

fix(ssh-agent): add error message if `~/.ssh` is not found (#11929)

Closes #11829 Co-authored-by: 's avatarCarlo Sala <carlosalag@protonmail.com>
parent 8152dc67
...@@ -13,6 +13,11 @@ function _start_agent() { ...@@ -13,6 +13,11 @@ function _start_agent() {
fi fi
fi fi
if [[ ! -d "$HOME/.ssh" ]]; then
echo "[oh-my-zsh] ssh-agent plugin requires ~/.ssh directory"
return 1
fi
# Set a maximum lifetime for identities added to ssh-agent # Set a maximum lifetime for identities added to ssh-agent
local lifetime local lifetime
zstyle -s :omz:plugins:ssh-agent lifetime lifetime zstyle -s :omz:plugins:ssh-agent lifetime lifetime
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment