File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 6
6
- Clean up imports
7
7
- Fix [ #131 ] ( https://github.com/gorilla-devs/ferium/issues/131 ) , clean up ` main.rs ` 's fetching of the current profile and modpack
8
8
- Fix [ #130 ] ( https://github.com/gorilla-devs/ferium/issues/130 )
9
+ - Fix [ #126 ] ( https://github.com/gorilla-devs/ferium/issues/126 ) . Removed ` sort ` subcommand, all profiles' mods are sorted when writing to config
9
10
10
11
## ` v4.1.2 `
11
12
### 08.06.2022
Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ Optionally, provide a list of names of the mods to remove"
75
75
#[ clap( help( "A case-insensitive list of names of a mods to remove" ) ) ]
76
76
mod_names : Vec < String > ,
77
77
} ,
78
- #[ clap( about( "Sort all your mods in alphabetical order" ) ) ]
79
- Sort ,
80
78
#[ clap( about( "Download and install the latest version of the mods specified" ) ) ]
81
79
Upgrade ,
82
80
}
Original file line number Diff line number Diff line change @@ -282,9 +282,6 @@ async fn actual_main(cli_app: Ferium) -> Result<()> {
282
282
check_empty_profile ( profile) ?;
283
283
subcommands:: remove ( profile, mod_names) ?;
284
284
} ,
285
- SubCommands :: Sort => get_active_profile ( & mut config) ?
286
- . mods
287
- . sort_by_cached_key ( |mod_| mod_. name . to_lowercase ( ) ) ,
288
285
SubCommands :: Upgrade => {
289
286
check_internet ( ) . await ?;
290
287
let profile = get_active_profile ( & mut config) ?;
@@ -293,6 +290,11 @@ async fn actual_main(cli_app: Ferium) -> Result<()> {
293
290
} ,
294
291
} ;
295
292
293
+ config. profiles . iter_mut ( ) . for_each ( |profile| {
294
+ profile
295
+ . mods
296
+ . sort_by_cached_key ( |mod_| mod_. name . to_lowercase ( ) )
297
+ } ) ;
296
298
// Update config file with possibly edited config
297
299
config:: write_file ( & mut config_file, & config) . await ?;
298
300
You can’t perform that action at this time.
0 commit comments