Files
Modrinth-plus/theseus_cli/src/main.rs

28 lines
489 B
Rust
Raw Normal View History

use eyre::Result;
use paris::*;
mod subcommands;
mod util;
#[derive(argh::FromArgs)]
/// The official Modrinth CLI
pub struct Args {
#[argh(subcommand)]
pub subcommand: subcommands::SubCommand,
}
2021-06-29 22:32:52 -07:00
#[tokio::main]
async fn main() -> Result<()> {
let args = argh::from_env::<Args>();
theseus::init().await?;
let res = args.dispatch().await;
if res.is_err() {
error!("An error has occurred!\n");
} else {
theseus::save().await?;
}
res
}