You've already forked AstralRinth
forked from xxxOFFxxx/AstralRinth
* Initial draft of profile metadata format * Remove records, add Clippy to Nix, fix Clippy error * Work on profile definition * BREAKING: Make global settings consistent with profile settings * Add builder methods & format * Integrate launching with profiles * Add profile loading * Launching via profile, API tweaks, and yak shaving * Incremental update, committing everything due to personal system maintainance * Prepare for review cycle * Remove reminents of experimental work * CLI: allow people to override the non-empty directory check * Fix mistake in previous commit * Handle trailing whitespace and newlines in prompts * Revamp prompt to use dialoguer and support defaults * Make requested changes
28 lines
489 B
Rust
28 lines
489 B
Rust
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,
|
|
}
|
|
|
|
#[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
|
|
}
|