Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Dec 10, 2024
1 parent b716dfe commit 726859a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PrismSharp.SourceGenerator/RegexCompilerGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Xml.Serialization;
Expand Down Expand Up @@ -252,10 +253,12 @@ private static void CompileNET45(KeyValuePair<string, string>[] languageDefiniti
new XmlSerializer(typeof(Root)).Serialize(fsXml, root);
fsXml.Dispose();

var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);

// File API is forbidden, but you're fine to execute a process? Really?
var psi = new ProcessStartInfo
{
FileName = "dotnet",
FileName = isLinux ? "mono" : "dotnet",
Arguments = $"{tempPath} {tempPathXml}" ,
WorkingDirectory = outputDirectory,
RedirectStandardOutput = true,
Expand Down

0 comments on commit 726859a

Please sign in to comment.