From 2668ffed434bcde889c837639701be1a5891d5b3 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 5 Apr 2018 17:48:37 -0400 Subject: [PATCH] Fixes python stderr not being logged --- TGS.Server/Instance/Repository.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/TGS.Server/Instance/Repository.cs b/TGS.Server/Instance/Repository.cs index 0a7a7a60f9..c1d4b7b571 100644 --- a/TGS.Server/Instance/Repository.cs +++ b/TGS.Server/Instance/Repository.cs @@ -1338,12 +1338,12 @@ namespace TGS.Server python.StartInfo.UseShellExecute = false; python.StartInfo.WorkingDirectory = new DirectoryInfo(RelativePath(RepoPath)).FullName; python.StartInfo.RedirectStandardOutput = true; + python.StartInfo.RedirectStandardError = true; python.Start(); using (StreamReader reader = python.StandardOutput) - { result = reader.ReadToEnd(); - - } + using (StreamReader reader = python.StandardError) + result += reader.ReadToEnd(); python.WaitForExit(); exitCode = python.ExitCode; } @@ -1364,11 +1364,12 @@ namespace TGS.Server pip.StartInfo.Arguments = "install " + I; pip.StartInfo.UseShellExecute = false; pip.StartInfo.RedirectStandardOutput = true; + pip.StartInfo.RedirectStandardError = true; pip.Start(); using (StreamReader reader = pip.StandardOutput) - { result += "\r\n---BEGIN-PIP-OUTPUT---\r\n" + reader.ReadToEnd(); - } + using (StreamReader reader = pip.StandardError) + result += reader.ReadToEnd(); pip.WaitForExit(); if (pip.ExitCode != 0) {