small cake cleanup

This commit is contained in:
Ell 2023-12-10 17:25:20 +01:00
parent 4a7a3e8e44
commit 80309a73a5

View file

@ -34,6 +34,7 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
RedirectStandardOutput = true,
RedirectStandardError = true
});
// make sure the output buffers (which we ignore) don't fill up
process.BeginOutputReadLine();
process.BeginErrorReadLine();
@ -48,12 +49,12 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
using (var reader = new StreamReader(stream)) {
var lastPos = 0L;
do {
if (reader.BaseStream.Length > lastPos) {
reader.BaseStream.Seek(lastPos, SeekOrigin.Begin);
if (stream.Length > lastPos) {
stream.Seek(lastPos, SeekOrigin.Begin);
string line;
while ((line = reader.ReadLine()) != null)
Information(line);
lastPos = reader.BaseStream.Position;
lastPos = stream.Position;
}
Thread.Sleep(10);
} while (!process.HasExited);