diff options
author | FxQnLr <[email protected]> | 2022-11-29 22:59:19 +0100 |
---|---|---|
committer | FxQnLr <[email protected]> | 2022-11-29 22:59:19 +0100 |
commit | 575d2493e8e5747bf65321f7277e52211d73e387 (patch) | |
tree | 11b20e371316047110ffd36d1fe5bfefd2183c07 /src/commands/update.rs | |
parent | ddde9204c72dd867f920f07f6483be03dda7cf68 (diff) | |
download | modlist-575d2493e8e5747bf65321f7277e52211d73e387.tar modlist-575d2493e8e5747bf65321f7277e52211d73e387.tar.gz modlist-575d2493e8e5747bf65321f7277e52211d73e387.zip |
fixed mod without matching specific version
Diffstat (limited to 'src/commands/update.rs')
-rw-r--r-- | src/commands/update.rs | 11 |
1 files changed, 8 insertions, 3 deletions
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 | |||
86 | let applicable_versions = versions(String::from(&config.apis.modrinth), String::from(&project.id), list.clone()).await; | 86 | let applicable_versions = versions(String::from(&config.apis.modrinth), String::from(&project.id), list.clone()).await; |
87 | 87 | ||
88 | let mut versions: Vec<String> = vec![]; | 88 | let mut versions: Vec<String> = vec![]; |
89 | 89 | ||
90 | for ver in &applicable_versions { | 90 | if !applicable_versions.is_empty() { |
91 | versions.push(String::from(&ver.id)); | 91 | for ver in &applicable_versions { |
92 | versions.push(String::from(&ver.id)); | ||
93 | } | ||
94 | } else { | ||
95 | versions.push(String::from("NONE")); | ||
92 | } | 96 | } |
97 | |||
93 | 98 | ||
94 | let mut current: Vec<Version> = vec![]; | 99 | let mut current: Vec<Version> = vec![]; |
95 | if input.clean || (versions.join("|") != userlist_get_applicable_versions(config.clone(), String::from(&list.id), String::from(&project.id))?) { | 100 | if input.clean || (versions.join("|") != userlist_get_applicable_versions(config.clone(), String::from(&list.id), String::from(&project.id))?) { |