fixed running on *nix causing log output to appear twice

This commit is contained in:
Ell 2023-12-10 15:46:33 +01:00
parent eb4bebe12a
commit 4a7a3e8e44

View file

@ -31,8 +31,11 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
var exeDir = System.IO.File.ReadAllText($"{tinyLifeDir}/GameDir"); var exeDir = System.IO.File.ReadAllText($"{tinyLifeDir}/GameDir");
var process = Process.Start(new ProcessStartInfo($"{exeDir}/Tiny Life") { var process = Process.Start(new ProcessStartInfo($"{exeDir}/Tiny Life") {
Arguments = $"-v --skip-splash --skip-preloads --debug-saves --ansi {args}", Arguments = $"-v --skip-splash --skip-preloads --debug-saves --ansi {args}",
CreateNoWindow = true RedirectStandardOutput = true,
RedirectStandardError = true
}); });
process.BeginOutputReadLine();
process.BeginErrorReadLine();
// we wait a bit to make sure the process has generated a new log file // we wait a bit to make sure the process has generated a new log file
Thread.Sleep(1000); Thread.Sleep(1000);