Skip to content

Commit

Permalink
Ensure strings are initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Apr 20, 2024
1 parent 98f848e commit 81279e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Cake.Issues.MsBuild/LogFileFormat/BinaryLogFileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using Cake.Core.Diagnostics;
using Microsoft.Build.Framework;
using Microsoft.Build.Logging.StructuredLogger;
Expand All @@ -23,6 +24,13 @@ public override IEnumerable<IIssue> ReadIssues(
repositorySettings.NotNull(nameof(repositorySettings));
issueProviderSettings.NotNull(nameof(issueProviderSettings));

// Ensure that strings for MsBuild.StructuredLogger are initialized.
// See https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/736
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Strings.Initialize();
}

var result = new List<IIssue>();

var binLogReader = new BinLogReader();
Expand Down

0 comments on commit 81279e4

Please sign in to comment.