diff --git a/Bonobo.Git.Server/Git/GitService/GitServiceExecutor.cs b/Bonobo.Git.Server/Git/GitService/GitServiceExecutor.cs index 07faaa577..984037757 100644 --- a/Bonobo.Git.Server/Git/GitService/GitServiceExecutor.cs +++ b/Bonobo.Git.Server/Git/GitService/GitServiceExecutor.cs @@ -51,7 +51,7 @@ public GitServiceExecutor(GitServiceExecutorParams parameters, IGitRepositoryLoc var info = new ProcessStartInfo(gitPath, args) { CreateNoWindow = true, - RedirectStandardError = true, + RedirectStandardError = false, RedirectStandardInput = true, RedirectStandardOutput = true, UseShellExecute = false, @@ -87,6 +87,7 @@ public GitServiceExecutor(GitServiceExecutorParams parameters, IGitRepositoryLoc using (var process = Process.Start(info)) { + var reader = process.StandardOutput.BaseStream.CopyToAsync(outStream); inStream.CopyTo(process.StandardInput.BaseStream); if (options.endStreamWithClose) { process.StandardInput.Close(); @@ -94,7 +95,7 @@ public GitServiceExecutor(GitServiceExecutorParams parameters, IGitRepositoryLoc process.StandardInput.Write('\0'); } - process.StandardOutput.BaseStream.CopyTo(outStream); + reader.Wait(); process.WaitForExit(); } }