Skip to content

Commit

Permalink
Fix NRE when coverage merge tool is not found (#3665)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored May 24, 2022
1 parent ed76cd5 commit 9374472
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ public async Task<ICollection<AttachmentSet>> ProcessAttachmentSetsAsync(XmlElem

if (coverageReportFilePaths.Count > 1)
{
var mergedCoverageReports = await MergeCodeCoverageFilesAsync(coverageReportFilePaths, progressReporter, cancellationToken).ConfigureAwait(false);
var resultAttachmentSet = new AttachmentSet(CodeCoverageDataCollectorUri, CoverageFriendlyName);

foreach (var coverageReport in mergedCoverageReports)
var mergedCoverageReports = await MergeCodeCoverageFilesAsync(coverageReportFilePaths, progressReporter, cancellationToken).ConfigureAwait(false);
if (mergedCoverageReports is not null)
{
resultAttachmentSet.Attachments.Add(UriDataAttachment.CreateFrom(coverageReport, CoverageFriendlyName));
foreach (var coverageReport in mergedCoverageReports)
{
resultAttachmentSet.Attachments.Add(UriDataAttachment.CreateFrom(coverageReport, CoverageFriendlyName));
}
}

foreach (var coverageOtherFilePath in coverageOtherFilePaths)
Expand Down

0 comments on commit 9374472

Please sign in to comment.