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
54
54
if ($LastExitCode -notin $AllowedExitCodes )
55
55
{
56
56
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
+ }
57
66
}
58
67
else {
59
68
Write-Host " Command succeeded ($duration )`n "
You can’t perform that action at this time.
0 commit comments