running-tasks/src/main.rs

32 lines
606 B
Rust
Raw Normal View History

2024-04-01 12:15:55 +00:00
use std::process::exit;
use clap::{Parser, Subcommand};
use commands::run;
mod commands;
mod utils;
#[derive(Subcommand, Debug)]
enum Command {
Run(run::Arguments)
}
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None, propagate_version = true)]
struct Arguments {
#[command(subcommand)]
command: Command
}
2024-04-01 10:50:03 +00:00
fn main() {
2024-04-01 12:15:55 +00:00
let arguments = Arguments::parse();
let result = match &arguments.command {
Command::Run(arguments) => { run::run(arguments) }
};
match result {
Ok(_) => exit(0),
Err(err) => eprintln!("{}", err)
}
2024-04-01 10:50:03 +00:00
}