From 4434cf43ce1507477ac5dc97792afbedb1b5ae40 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 11 May 2020 15:08:42 -0700 Subject: [PATCH] Don't throw on dotnet exit codes (#21639) Operation can succeed for purposes of the tests, the tests will fail if things aren't setup properly, so we can safely ignore the errors --- eng/helix/content/RunTests/TestRunner.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eng/helix/content/RunTests/TestRunner.cs b/eng/helix/content/RunTests/TestRunner.cs index f53a5fabb348..e9763cde6f96 100644 --- a/eng/helix/content/RunTests/TestRunner.cs +++ b/eng/helix/content/RunTests/TestRunner.cs @@ -122,26 +122,30 @@ await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", $"nuget add source {Options.HELIX_WORKITEM_ROOT} --configfile NuGet.config", environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, - errorDataReceived: Console.Error.WriteLine); + errorDataReceived: Console.Error.WriteLine, + throwOnError: false); await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", "nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --configfile NuGet.config", environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, - errorDataReceived: Console.Error.WriteLine); + errorDataReceived: Console.Error.WriteLine, + throwOnError: false); // Write nuget sources to console, useful for debugging purposes await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", "nuget list source", environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, - errorDataReceived: Console.Error.WriteLine); + errorDataReceived: Console.Error.WriteLine, + throwOnError: false); await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet", $"tool install dotnet-ef --version {Options.EfVersion} --tool-path {Options.HELIX_WORKITEM_ROOT}", environmentVariables: EnvironmentVariables, outputDataReceived: Console.WriteLine, - errorDataReceived: Console.Error.WriteLine); + errorDataReceived: Console.Error.WriteLine, + throwOnError: false); // ';' is the path separator on Windows, and ':' on Unix Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";