mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
add complement wrapper xtask script
This commit is contained in:
parent
3f89bc4a7c
commit
ef6eb27b9b
10 changed files with 292 additions and 0 deletions
30
xtask/src/main.rs
Normal file
30
xtask/src/main.rs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
mod complement;
|
||||
|
||||
use std::process::ExitCode;
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Args {
|
||||
#[clap(subcommand)]
|
||||
command: Command,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum Command {
|
||||
Complement(complement::Args),
|
||||
}
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let args = Args::parse();
|
||||
let result = match args.command {
|
||||
Command::Complement(args) => complement::main(args),
|
||||
};
|
||||
let Err(e) = result else {
|
||||
return ExitCode::SUCCESS;
|
||||
};
|
||||
// Include a leading newline because sometimes an error will occur in
|
||||
// the middle of displaying a progress indicator.
|
||||
eprintln!("\n{e:?}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue