Reorder error and warning log line processing (#6792)

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2025-10-20 10:00:18 -07:00 committed by GitHub
parent 3587514b29
commit 5afdf22a90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,12 +114,12 @@ function LogJobFailure() {
function ProcessMsBuildLogLine($line) {
if (Test-SupportsDevOpsLogging) {
if ($line -like "*: warning*") {
return ("##vso[task.LogIssue type=warning;]$line" -replace "`n", "%0D%0A")
}
elseif ($line -like "*: error*") {
if ($line -like "*: error*") {
return ("##vso[task.LogIssue type=error;]$line" -replace "`n", "%0D%0A")
}
elseif ($line -like "*: warning*") {
return ("##vso[task.LogIssue type=warning;]$line" -replace "`n", "%0D%0A")
}
}
return $line
}