File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
eng/common/scripts/Helpers Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,15 @@ function Invoke-LoggedCommand
5454 if ($LastExitCode -notin $AllowedExitCodes )
5555 {
5656 LogError " Command failed to execute ($duration ): $Command `n "
57+
58+ # This fix reproduces behavior that existed before
59+ # https://github.com/Azure/azure-sdk-tools/pull/12235
60+ # Before that change, if a command failed Write-Error was always
61+ # invoked in the failure case. Today, LogError only does Write-Error
62+ # when running locally (not in a CI environment)
63+ if ((Test-SupportsDevOpsLogging ) -or (Test-SupportsGitHubLogging )) {
64+ Write-Error " Command failed to execute ($duration ): $Command `n "
65+ }
5766 }
5867 else {
5968 Write-Host " Command succeeded ($duration )`n "
You can’t perform that action at this time.
0 commit comments