Merge pull request #391 from bluepilledgreat/version-2.4.0-ignore-auto-update-errors

ignore exceptions while fetching new releases
This commit is contained in:
pizzaboxer 2023-07-16 16:29:23 +01:00 committed by GitHub
commit 6fe62dd387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -563,7 +563,16 @@ namespace Bloxstrap
App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Checking for updates...");
var releaseInfo = await Utility.Http.GetJson<GithubRelease>($"https://api.github.com/repos/{App.ProjectRepository}/releases/latest");
GithubRelease? releaseInfo;
try
{
releaseInfo = await Http.GetJson<GithubRelease>($"https://api.github.com/repos/{App.ProjectRepository}/releases/latest");
}
catch (Exception ex)
{
App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Failed to fetch releases: {ex}");
return;
}
if (releaseInfo is null || releaseInfo.Assets is null)
{