From 08bcc7ac7c8d989e4e3e055dfb7e70dccfc67588 Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:27:18 +0100 Subject: [PATCH] fix: error handling when entering passwords (#963) --- src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index b0b113fe7..c0b1d0352 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -271,8 +271,8 @@ fn open_repository( .interact()?; match repo.clone().open_with_password(&pass) { Ok(repo) => return Ok(repo), - // TODO: fail if error != Password incorrect - Err(_) => continue, + Err(err) if err.is_incorrect_password() => continue, + Err(err) => return Err(err.into()), } } }