Make all command execution synchronous

- This fixes a bunch of weird races I was seeing building
larger solutions.
This commit is contained in:
David Fowler 2015-10-21 03:11:27 -07:00
parent c1e2d152e3
commit 5872aa0f0c
5 changed files with 29 additions and 30 deletions

View file

@ -101,8 +101,7 @@ namespace Microsoft.DotNet.Tools.Publish
var result = Command.Create("dotnet-compile", $"--framework {context.TargetFramework.DotNetFrameworkName} {context.ProjectFile.ProjectDirectory}")
.ForwardStdErr()
.ForwardStdOut()
.RunAsync()
.Result;
.Execute();
if (result.ExitCode != 0)
{
@ -187,9 +186,7 @@ exec ""$DIR/corerun"" ""$DIR/{context.ProjectFile.Name}.exe"" $*
Command.Create("chmod", $"a+x {outputExe}")
.ForwardStdOut()
.ForwardStdErr()
.RunAsync()
.GetAwaiter()
.GetResult();
.Execute();
return 0;
}