only try to get id_rsa pw if unlock is successful

This commit is contained in:
2026-01-26 11:21:13 -05:00
parent 03ad6cfb40
commit 3c12bb19e0
+1 -2
View File
@@ -91,8 +91,7 @@ if command -v keychain >/dev/null; then
alias keychain="keychain --nolock --absolute --dir $XDG_RUNTIME_DIR"
eval "$(keychain --quick --eval)"
if command -v rbw >/dev/null; then
rbw unlock
SSH_ASKPASS=get_id_rsa_pass SSH_ASKPASS_REQUIRE=force ssh-add ~/.ssh/id_rsa
rbw unlock && SSH_ASKPASS=get_id_rsa_pass SSH_ASKPASS_REQUIRE=force ssh-add ~/.ssh/id_rsa
else
ssh-add ~/.ssh/id_rsa
fi