This commit is contained in:
jamesk 2024-03-29 10:37:06 -04:00
parent caf9f5140b
commit bfb162aede
2 changed files with 3 additions and 9 deletions

View File

@ -15,14 +15,13 @@ fn main() {
let movable = options.clone(); let movable = options.clone();
let _app = match options.command { let _app = match options.command {
None => {} Commands::Create { root_dir, output_path } => {
Some(Commands::Create { root_dir, output_path }) => {
let mut create = let mut create =
CreateMode::new(output_path, root_dir); CreateMode::new(output_path, root_dir);
println!("Creating snapshot.."); println!("Creating snapshot..");
create.run() create.run()
}, },
Some(Commands::Compare { left, right, selection }) => { Commands::Compare { left, right, selection } => {
println!("Running snapshot comparison.."); println!("Running snapshot comparison..");
let mut compare = CompareMode::new(movable.clone(), left, right, selection); let mut compare = CompareMode::new(movable.clone(), left, right, selection);
compare.run() compare.run()

View File

@ -4,12 +4,7 @@ use clap::{Parser, Subcommand};
#[derive(Parser, Clone, Debug)] #[derive(Parser, Clone, Debug)]
pub struct Arguments { pub struct Arguments {
#[command(subcommand)] #[command(subcommand)]
pub command: Option<Commands>, pub command: Commands,
#[arg(short, long)]
pub input_path: Option<String>,
#[arg(short, long)]
pub output_path: Option<String>,
} }
#[derive(Subcommand, Clone, Debug)] #[derive(Subcommand, Clone, Debug)]