Browse Source

Handle empty commit on updates

pull/14/head
Ionite 1 year ago
parent
commit
ac596f3458
No known key found for this signature in database
  1. 7
      StabilityMatrix/Models/Packages/BaseGitPackage.cs

7
StabilityMatrix/Models/Packages/BaseGitPackage.cs

@ -180,7 +180,12 @@ public abstract class BaseGitPackage : BasePackage
else
{
var allCommits = await GetAllCommits(package.InstalledBranch);
var latestCommitHash = allCommits.First().Sha;
if (!(allCommits != null && allCommits.Any()))
{
Logger.Warn("No commits found for {Package}", package.PackageName);
return false;
}
var latestCommitHash = allCommits[0].Sha;
return latestCommitHash != currentVersion;
}

Loading…
Cancel
Save