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()), } } }