mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-11-21 11:33:29 +01:00
small cake cleanup
This commit is contained in:
parent
4a7a3e8e44
commit
80309a73a5
1 changed files with 4 additions and 3 deletions
|
@ -34,6 +34,7 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
RedirectStandardError = true
|
RedirectStandardError = true
|
||||||
});
|
});
|
||||||
|
// make sure the output buffers (which we ignore) don't fill up
|
||||||
process.BeginOutputReadLine();
|
process.BeginOutputReadLine();
|
||||||
process.BeginErrorReadLine();
|
process.BeginErrorReadLine();
|
||||||
|
|
||||||
|
@ -48,12 +49,12 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
|
||||||
using (var reader = new StreamReader(stream)) {
|
using (var reader = new StreamReader(stream)) {
|
||||||
var lastPos = 0L;
|
var lastPos = 0L;
|
||||||
do {
|
do {
|
||||||
if (reader.BaseStream.Length > lastPos) {
|
if (stream.Length > lastPos) {
|
||||||
reader.BaseStream.Seek(lastPos, SeekOrigin.Begin);
|
stream.Seek(lastPos, SeekOrigin.Begin);
|
||||||
string line;
|
string line;
|
||||||
while ((line = reader.ReadLine()) != null)
|
while ((line = reader.ReadLine()) != null)
|
||||||
Information(line);
|
Information(line);
|
||||||
lastPos = reader.BaseStream.Position;
|
lastPos = stream.Position;
|
||||||
}
|
}
|
||||||
Thread.Sleep(10);
|
Thread.Sleep(10);
|
||||||
} while (!process.HasExited);
|
} while (!process.HasExited);
|
||||||
|
|
Loading…
Reference in a new issue