Compare commits

...

3 commits

2 changed files with 9 additions and 3 deletions

View file

@ -16,13 +16,16 @@ This is a rather unorganised list of TODOs just so I can somewhat keep track of
merge (with conflict overrides on a file content level) should result in an install dir with A and B, where a.json and b.json are in A, and a.json is the result of merging a.json into the installed a.json (overwriting any existing key's values with the modpack's values), and the original files in folder B untouched (x.json and y.json) merge (with conflict overrides on a file content level) should result in an install dir with A and B, where a.json and b.json are in A, and a.json is the result of merging a.json into the installed a.json (overwriting any existing key's values with the modpack's values), and the original files in folder B untouched (x.json and y.json)
merge (retaining original/modified values) merge should result in an install dir with A and B, where a.json and b.json are in A, and a.json is the result of merging a.json into the installed a.json (retaining the existing values from the file in the install dir), and the original files in folder B untouched (x.json and y.json) merge (retaining original/modified values) merge should result in an install dir with A and B, where a.json and b.json are in A, and a.json is the result of merging a.json into the installed a.json (retaining the existing values from the file in the install dir), and the original files in folder B untouched (x.json and y.json)
- [ ] Test the merge apply policies when I am not half asleep - [X] Test the merge apply policies when I am not half asleep. (nevermind, I tested while half asleep and seems good to me)
- [ ] Show package version somewhere in `mmm` - [ ] Show package version somewhere in `mmm`
- [X] Save userdata after removing profiles with the remove command
### Nice to haves ### Nice to haves
- [ ] Preserve formatting as much as possible when merging files
- [ ] Allow for overriding file types for file merge apply policies rather than relying on the file extension
- [ ] Support resource and shaderpack installs rather than just mods. - [ ] Support resource and shaderpack installs rather than just mods.
- [ ] Concurrent mod downloads to speed up profile installation/updates. - [ ] Concurrent mod downloads to speed up profile installation/updates.
- [ ] Concurrent mod metadata downloads to speed up running the `update` command. - [ ] Concurrent mod metadata downloads to speed up running the `update` command.
- [ ] Get mmm working properly on `wayland` with Nix. - [ ] Get mmm working properly on `wayland` with Nix.
- [ ] Get cross-compilation to Windows working with the mingw toolcahin. - [ ] Get cross-compilation to Windows working with the mingw toolchain.

View file

@ -6,7 +6,7 @@ mod profiles;
mod providers; mod providers;
mod resolver; mod resolver;
use anyhow::{Error, Result}; use anyhow::{Context, Error, Result};
use clap::{Args, Parser, Subcommand}; use clap::{Args, Parser, Subcommand};
use file_meta::{get_normalized_relative_path, FileApplyPolicy, FileMeta}; use file_meta::{get_normalized_relative_path, FileApplyPolicy, FileMeta};
use mod_meta::{ModMeta, ModProvider}; use mod_meta::{ModMeta, ModProvider};
@ -507,6 +507,9 @@ async fn main() -> anyhow::Result<()> {
ProfileCommands::Remove { name } => { ProfileCommands::Remove { name } => {
let mut userdata = profiles::Data::load()?; let mut userdata = profiles::Data::load()?;
userdata.remove_profile(&name); userdata.remove_profile(&name);
userdata.save().with_context(|| {
format!("Failed to save userdata after removing profile {name}")
})?;
println!("Removed profile '{name}'"); println!("Removed profile '{name}'");
} }
ProfileCommands::Show { name } => { ProfileCommands::Show { name } => {