mirror of
https://github.com/Ellpeck/TinyLifeExampleMod.git
synced 2024-12-22 15:39:22 +01:00
print the log at least once even if the game exits early
This commit is contained in:
parent
ffa44436d6
commit
c068b255a5
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
|
|||
using (var stream = new FileStream(log, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
|
||||
using (var reader = new StreamReader(stream)) {
|
||||
var lastPos = 0L;
|
||||
while (!process.HasExited) {
|
||||
do {
|
||||
if (reader.BaseStream.Length > lastPos) {
|
||||
reader.BaseStream.Seek(lastPos, SeekOrigin.Begin);
|
||||
string line;
|
||||
|
@ -52,7 +52,7 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
|
|||
lastPos = reader.BaseStream.Position;
|
||||
}
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
} while (!process.HasExited);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue