Improve git update error reporting

This commit is contained in:
Canon
2026-05-22 15:00:03 +08:00
parent 1402e192d7
commit c01df3012e
9 changed files with 252 additions and 44 deletions
+1 -13
View File
@@ -53,19 +53,7 @@ public class UpdateCommand(
"Updating mods",
updateableMods,
installedMod => installedMod.Name,
async (mod, progress) =>
{
progress.Report(25);
var fetchOk = await gitService.FetchAsync(mod.Path, ct: ct);
if (!fetchOk)
return (false, "Fetch failed");
progress.Report(50);
var pullOk = await gitService.PullAsync(mod.Path, ct: ct);
progress.Report(100);
return (pullOk, pullOk ? null : "Pull failed");
});
async (mod, progress) => await GitModUpdater.UpdateAsync(gitService, mod, progress, ct));
ModTableRenderer.RenderUpdateSummary(results);