more logging

This commit is contained in:
2024-12-05 07:22:01 +01:00
parent 3e1ab72162
commit 3b79335e85
2 changed files with 10 additions and 9 deletions

View File

@@ -62,8 +62,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
}
installInfos = await DownloadInstallInfos();
result.CurrentVersion = modpackInfo.Version ?? installInfos.Version;
var curVersion = result.CurrentVersion;
result.CurrentVersion = modpackInfo.Version ?? new Version("0.0.0.0");
// Check install actions
if (!exists)
@@ -77,7 +76,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
{
result.Actions.AddRange(actions);
result.LatestVersion = installInfos.Version;
curVersion = installInfos.Version;
result.CurrentVersion = installInfos.Version;
}
}
@@ -96,9 +95,8 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
var checkingVersionIndex = 0;
var checkingVersion = updatesOrderes.ElementAtOrDefault(checkingVersionIndex);
var actionsZeroIndex = result.Actions.Count; // Ensure we insert update actions behind install actions
result.IsInstalled = true;
while (checkingVersion is not null && checkingVersion.Version > curVersion)
while (checkingVersion is not null && checkingVersion.Version > result.CurrentVersion)
{
var actionsToAdd = new List<UpdateAction>();