From d527f95b5d006f76e572e7db78878c1836f02639 Mon Sep 17 00:00:00 2001 From: Anssi Piirainen Date: Thu, 24 Oct 2024 15:40:56 +0300 Subject: [PATCH] Fix credential edit to not clear password --- CHANGELOG.md | 4 ++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/ui/input.rs | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1518a4d..88b6b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [2.5.1] + +- Fix to not clear the password prompt when editing a credential and skipping the password change + ## [2.5.0] - Added the init command to easily start using this tool diff --git a/Cargo.lock b/Cargo.lock index ba94966..dcdc7d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1669,7 +1669,7 @@ dependencies = [ [[package]] name = "passlane" -version = "2.5.0" +version = "2.5.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 3ec8b6a..2e7ecc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "passlane" -version = "2.5.0" +version = "2.5.1" edition = "2021" authors = ["Anssi Piirainen "] license = "GPL-3.0-or-later" diff --git a/src/ui/input.rs b/src/ui/input.rs index d9ddf9d..d4c7513 100644 --- a/src/ui/input.rs +++ b/src/ui/input.rs @@ -158,7 +158,7 @@ pub fn ask_password(question: &str, help_message: Option<&str>) -> String { pub fn ask_new_password(question: &str) -> Option { if ask_with_options("Do you want to change the password?", vec!["y", "n"]) == "n" { - return Some("".to_string()); + return None; } let prompt = Password::new(question); Some(prompt.prompt().unwrap())