Ensure Flax.Build tasks and utilities output error messages as errors

This commit is contained in:
2025-12-16 00:11:06 +02:00
parent 74c1e200ce
commit 46fd5a5855
2 changed files with 19 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ namespace Flax.Build.BuildSystem.Graph
CreateNoWindow = true,
};
process.OutputDataReceived += ProcessDebugOutput;
process.ErrorDataReceived += ProcessDebugOutput;
process.ErrorDataReceived += ProcessDebugError;
process.Start();
process.BeginOutputReadLine();
@@ -273,5 +273,14 @@ namespace Flax.Build.BuildSystem.Graph
Log.Info(output);
}
}
private static void ProcessDebugError(object sender, DataReceivedEventArgs e)
{
string output = e.Data;
if (output != null)
{
Log.Error(output);
}
}
}
}