steam puts logs in stderr, so dont do LogError for that so ppl dont complain

This commit is contained in:
JohnCorby 2023-06-10 11:19:35 -07:00
parent c68c3fbc52
commit 216197e466

View File

@ -39,7 +39,7 @@ public static class Interop
DoCommand(false, 1, (int)type); DoCommand(false, 1, (int)type);
} }
private static int DoCommand(bool wait, int type, int arg = default) private static int DoCommand(bool waitForExit, int type, int arg = default)
{ {
var processPath = Path.Combine( var processPath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!,
@ -68,12 +68,12 @@ public static class Interop
RedirectStandardOutput = true, RedirectStandardOutput = true,
RedirectStandardError = true RedirectStandardError = true
}); });
if (wait) if (waitForExit)
{ {
process!.WaitForExit(); process!.WaitForExit();
Log($"StandardOutput:\n{process.StandardOutput.ReadToEnd()}"); Log($"StandardOutput:\n{process.StandardOutput.ReadToEnd()}");
LogError($"StandardError:\n{process.StandardError.ReadToEnd()}"); Log($"StandardError:\n{process.StandardError.ReadToEnd()}");
Log($"ExitCode: {process.ExitCode}"); Log($"ExitCode: {process.ExitCode}");
return process.ExitCode; return process.ExitCode;