diff options
author | Vishal Sharma <106011641+vishal-sharma-369@users.noreply.github.com> | 2023-10-18 23:44:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 20:14:47 +0200 |
commit | 0da416986aadbaf89dc5596b01f9b42403f4d9fd (patch) | |
tree | 027c5a1e7e37ac26bbefa8bbedf502448e4020c8 /plugins | |
parent | 8152dc673b14c89dc12e816583e24532ed77e8ae (diff) | |
download | zsh-0da416986aadbaf89dc5596b01f9b42403f4d9fd.tar.gz zsh-0da416986aadbaf89dc5596b01f9b42403f4d9fd.tar.bz2 zsh-0da416986aadbaf89dc5596b01f9b42403f4d9fd.zip |
fix(ssh-agent): add error message if `~/.ssh` is not found (#11929)
Closes #11829
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ssh-agent/ssh-agent.plugin.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 78ac46b13..49ad95a11 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -13,6 +13,11 @@ function _start_agent() { 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 local lifetime zstyle -s :omz:plugins:ssh-agent lifetime lifetime |