feat: updates

This commit is contained in:
2023-09-07 08:38:26 +08:00
parent 8939237d99
commit 1230601ed2
5 changed files with 40 additions and 27 deletions

View File

@@ -35,6 +35,7 @@ enum Commands {
Decrypt {
/// Files need to be decrypted
paths: Vec<PathBuf>,
/// PIN
#[arg(long)]
pin: Option<String>,
},
@@ -56,7 +57,7 @@ fn main() -> XResult<()> {
paths.iter().for_each(|f| information!("{:?}", f));
Ok(())
}
Commands::Decrypt { mut paths, pin } => {
Commands::Decrypt { paths, pin } => {
for path in &paths {
match cmd_decrypt::decrypt(path, &pin) {
Ok(_) => success!("Decrypt {} succeed", path.to_str().unwrap_or("N/A")),