diff --git a/src/commands/install.rs b/src/commands/install.rs index 590ade8..caa1b74 100644 --- a/src/commands/install.rs +++ b/src/commands/install.rs @@ -40,11 +40,6 @@ impl Install { let client = reqwest::Client::new(); for mod_name in &self.mods { - if config.mods.contains_key(mod_name) { - println!("{} mod already installed, skipping...", mod_name); - continue; - } - let url = format!("{}/project/{}/version", Self::BASE_URL, mod_name); let params = InstallQueryParams { diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 51a02d0..83e620d 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,4 +1,3 @@ pub mod create; pub mod install; pub mod search; -pub mod update; diff --git a/src/commands/update.rs b/src/commands/update.rs deleted file mode 100644 index 46576b3..0000000 --- a/src/commands/update.rs +++ /dev/null @@ -1,28 +0,0 @@ -use std::error::Error; - -pub struct Update { - mods_only: bool, - loader_only: bool, - loader_version: Option, - version: Option, -} - -impl Update { - pub fn new( - mods_only: bool, - loader_only: bool, - loader_version: Option, - version: Option, - ) -> Self { - Self { - mods_only, - loader_only, - loader_version, - version, - } - } - - pub async fn run(&self) -> Result<(), Box> { - Ok(()) - } -} diff --git a/src/main.rs b/src/main.rs index 9d51201..6d33756 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ mod commands; mod models; mod utils; -use crate::commands::{create::Create, install::Install, search::Search, update::Update}; +use crate::commands::{create::Create, install::Install, search::Search}; use clap::{ Parser, Subcommand, builder::styling::{self}, @@ -75,25 +75,6 @@ enum Commands { #[arg(trailing_var_arg = true)] mods: Vec, }, - - /// Update minecraft/mods/loader for project in current directory - Update { - /// Only update mods to latest version for current minecraft version - #[arg(long, conflicts_with_all = ["loader_only", "loader_version"])] - mods_only: bool, - - /// Only update mod loader to latest version - #[arg(long, conflicts_with_all = ["mods_only", "version"])] - loader_only: bool, - - /// Specify mod loader version to update to - #[arg(long, conflicts_with = "mods_only")] - loader_version: Option, - - /// Specify minecraft version to update to - #[arg(long, conflicts_with = "loader_only")] - version: Option, - }, } #[tokio::main] @@ -139,20 +120,6 @@ async fn main() -> Result<(), Box> { let install = Install::new(mods); install.run().await?; } - Commands::Update { - mods_only, - loader_only, - loader_version, - version, - } => { - let update = Update::new( - mods_only, - loader_only, - loader_version, - version, - ); - update.run().await?; - } } Ok(())