Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eng/common/tools.sh')
-rwxr-xr-xeng/common/tools.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 871527241..0295dd9ff 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -441,8 +441,17 @@ function MSBuild-Core {
"$_InitializeBuildTool" "$@" || {
local exit_code=$?
- Write-PipelineTaskError "Build failed (exit code '$exit_code')."
- ExitWithExitCode $exit_code
+ # 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.
+ echo "Build failed with exit code $exit_code. Check errors above."
+ if [[ "$ci" == "true" ]]; then
+ 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 $exit_code
+ fi
}
}