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 _app = match options.command {
None => {}
Some(Commands::Create { root_dir, output_path }) => {
Commands::Create { root_dir, output_path } => {
let mut create =
CreateMode::new(output_path, root_dir);
println!("Creating snapshot..");
create.run()
},
Some(Commands::Compare { left, right, selection }) => {
Commands::Compare { left, right, selection } => {
println!("Running snapshot comparison..");
let mut compare = CompareMode::new(movable.clone(), left, right, selection);
compare.run()

View File

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