From 575d2493e8e5747bf65321f7277e52211d73e387 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Tue, 29 Nov 2022 22:59:19 +0100 Subject: fixed mod without matching specific version --- src/commands/update.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/commands/update.rs') diff --git a/src/commands/update.rs b/src/commands/update.rs index c8f0880..be15cfa 100644 --- a/src/commands/update.rs +++ b/src/commands/update.rs @@ -86,10 +86,15 @@ async fn specific_update(config: Cfg, input: Input, list: List, project: Project let applicable_versions = versions(String::from(&config.apis.modrinth), String::from(&project.id), list.clone()).await; let mut versions: Vec = vec![]; - - for ver in &applicable_versions { - versions.push(String::from(&ver.id)); + + if !applicable_versions.is_empty() { + for ver in &applicable_versions { + versions.push(String::from(&ver.id)); + } + } else { + versions.push(String::from("NONE")); } + let mut current: Vec = vec![]; if input.clean || (versions.join("|") != userlist_get_applicable_versions(config.clone(), String::from(&list.id), String::from(&project.id))?) { -- cgit v1.2.3