From b88e2c1ba92e3fc2d0bb3543414fae4825e17ad3 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Tue, 25 Apr 2023 10:35:27 -0500 Subject: [PATCH] only load ssh key if it exists --- zsh/.zshrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 333b87f..f38f717 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -30,7 +30,8 @@ fi if type mcfly > /dev/null; then eval "$(mcfly init zsh)" fi -eval "$(ssh-agent)" -ssh-add ~/.ssh/id_ed25519 - +if [ -f $HOME/.ssh/id_ed25519 ]; then + eval "$(ssh-agent)" + ssh-add $HOME/.ssh/id_ed25519 +fi