chocolatey/chocolatey — pull request #488 by tsaddi (2014-06-17 11:45:18+00:00)
Title: Read output streams before calling WaitForExit() to avoid a deadlock for packages with many dependencies.

For packages with many dependencies the output stream from calling NuGet.exe in functions/Run-NuGet can be filled and cause a deadlock as described on MSDN.

Moving the call to WaitForExit() to after the output streams have been read solves this problem.