feat: updates

This commit is contained in:
2025-03-29 00:04:25 +08:00
parent 6d3298549e
commit a6bff6d31c
36 changed files with 115 additions and 137 deletions

View File

@@ -1,7 +1,7 @@
use crate::cmdutil;
use crate::keychain::KeychainKey;
use clap::{App, Arg, ArgMatches, SubCommand};
use rust_util::util_clap::{Command, CommandError};
use crate::cmdutil;
pub struct CommandImpl;
@@ -28,7 +28,7 @@ impl Command for CommandImpl {
if let Some(keychain_name) = keychain_name {
let keychain_key = KeychainKey::from_key_name_default(keychain_name);
if let Some(_) = keychain_key.get_password()? {
if keychain_key.get_password()?.is_some() {
return simple_error!("Keychain key URI: {} exists", keychain_key.to_key_uri());
}