chore: Trim the added vault name
This commit is contained in:
parent
095aa37219
commit
31afe4fd58
1 changed files with 1 additions and 0 deletions
|
@ -50,6 +50,7 @@ pub struct Add {
|
||||||
impl LprsCommand for Add {
|
impl LprsCommand for Add {
|
||||||
fn run(mut self, mut vault_manager: Vaults) -> LprsResult<()> {
|
fn run(mut self, mut vault_manager: Vaults) -> LprsResult<()> {
|
||||||
if !self.vault_info.is_empty() {
|
if !self.vault_info.is_empty() {
|
||||||
|
self.vault_info.name = self.vault_info.name.trim().to_string();
|
||||||
self.vault_info.password = utils::user_password(self.password, "Vault password:")?;
|
self.vault_info.password = utils::user_password(self.password, "Vault password:")?;
|
||||||
self.vault_info.custom_fields = self.custom_fields.into_iter().collect();
|
self.vault_info.custom_fields = self.custom_fields.into_iter().collect();
|
||||||
vault_manager.add_vault(self.vault_info);
|
vault_manager.add_vault(self.vault_info);
|
||||||
|
|
Loading…
Reference in a new issue