summaryrefslogtreecommitdiff
path: root/src/commands/update.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/update.rs')
-rw-r--r--src/commands/update.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/update.rs b/src/commands/update.rs
index 4bc3ac0..d76ba4b 100644
--- a/src/commands/update.rs
+++ b/src/commands/update.rs
@@ -18,19 +18,19 @@ pub async fn update(
18 delete_old: bool, 18 delete_old: bool,
19) -> MLE<()> { 19) -> MLE<()> {
20 for current_list in liststack { 20 for current_list in liststack {
21 println!("Update mods in {}", current_list.id);
21 let mods = userlist_get_all_ids(config.clone(), current_list.clone().id)?; 22 let mods = userlist_get_all_ids(config.clone(), current_list.clone().id)?;
22 23
23 let mut current_versions: Vec<(String, String)> = vec![]; 24 let mut current_versions: Vec<(String, String)> = vec![];
24 25
25 println!(" └Update mods:");
26 let mut updatestack: Vec<Version> = vec![]; 26 let mut updatestack: Vec<Version> = vec![];
27 27
28 for id in mods { 28 for id in mods {
29 let info = mods_get_info(config.clone(), &id)?; 29 let info = mods_get_info(config.clone(), &id)?;
30 println!("\t└{}", info.title); 30 println!(" └{}", info.title);
31 31
32 if userlist_get_set_version(config.clone(), &current_list.id, &id)? { 32 if userlist_get_set_version(config.clone(), &current_list.id, &id)? {
33 println!("\t └Set version, skipping update"); 33 println!(" └Set version, skipping update");
34 continue; 34 continue;
35 } 35 }
36 36
@@ -54,7 +54,7 @@ pub async fn update(
54 Err(e) => { 54 Err(e) => {
55 if e.to_string() == "Mod: NO_UPDATE_AVAILABLE" { 55 if e.to_string() == "Mod: NO_UPDATE_AVAILABLE" {
56 println!( 56 println!(
57 "\t └No new version found for the specified minecraft version" 57 " └No new version found for the specified minecraft version"
58 ); 58 );
59 } else { 59 } else {
60 return Err(e); 60 return Err(e);
@@ -76,10 +76,10 @@ pub async fn update(
76 if !clean { 76 if !clean {
77 for ver in current_versions { 77 for ver in current_versions {
78 if delete_old { 78 if delete_old {
79 println!("\t └Delete version {}", ver.0); 79 println!(" └Delete version {}", ver.0);
80 delete_version(current_list.clone(), ver.0)?; 80 delete_version(current_list.clone(), ver.0)?;
81 } else if ver.0 != "NONE" { 81 } else if ver.0 != "NONE" {
82 println!("\t └Disable version {}", ver.0); 82 println!(" └Disable version {}", ver.0);
83 disable_version(config.clone(), current_list.clone(), ver.0, ver.1)?; 83 disable_version(config.clone(), current_list.clone(), ver.0, ver.1)?;
84 }; 84 };
85 } 85 }