Don't die when updating plugins with no releases
This commit is contained in:
@@ -153,6 +153,13 @@ namespace Torch.Managers
|
|||||||
|
|
||||||
manifest.Version.TryExtractVersion(out Version currentVersion);
|
manifest.Version.TryExtractVersion(out Version currentVersion);
|
||||||
var latest = await PluginQuery.Instance.QueryOne(manifest.Guid);
|
var latest = await PluginQuery.Instance.QueryOne(manifest.Guid);
|
||||||
|
|
||||||
|
if (latest?.LatestVersion == null)
|
||||||
|
{
|
||||||
|
_log.Warn($"Plugin {manifest.Name} does not have any releases on torchapi.net. Cannot update.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
latest.LatestVersion.TryExtractVersion(out Version newVersion);
|
latest.LatestVersion.TryExtractVersion(out Version newVersion);
|
||||||
|
|
||||||
if (currentVersion == null || newVersion == null)
|
if (currentVersion == null || newVersion == null)
|
||||||
|
Reference in New Issue
Block a user