diff options
author | dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> | 2020-12-14 16:21:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 16:21:37 +0300 |
commit | 3c99958a2a64622a69272b353ba05428dd53decd (patch) | |
tree | c42f797e0e4feb0d9f8a57641516e646763773fb /eng/common/tools.ps1 | |
parent | 7806fc946c9155b48401805f7c976a287a6b3caf (diff) |
Update dependencies from https://github.com/dotnet/arcade build 20201210.4 (#1697)
[master] Update dependencies from dotnet/arcade
Diffstat (limited to 'eng/common/tools.ps1')
-rw-r--r-- | eng/common/tools.ps1 | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index fc09059ff..bc8b66e29 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -677,14 +677,23 @@ function MSBuild-Core() { $exitCode = Exec-Process $buildTool.Path $cmdArgs if ($exitCode -ne 0) { - Write-PipelineTelemetryError -Category 'Build' -Message 'Build failed.' + # We should not Write-PipelineTaskError here because that message shows up in the build summary + # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. + Write-Host "Build failed with exit code $exitCode. Check errors above." -ForegroundColor Red $buildLog = GetMSBuildBinaryLogCommandLineArgument $args - if ($buildLog -ne $null) { + if ($null -ne $buildLog) { Write-Host "See log: $buildLog" -ForegroundColor DarkGray } - ExitWithExitCode $exitCode + if ($ci) { + Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed." + # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error + # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error + ExitWithExitCode 0 + } else { + ExitWithExitCode $exitCode + } } } |