diff --git a/.pipelines/applyXamlStyling.ps1 b/.pipelines/applyXamlStyling.ps1 index a057c85fc8..e47edd0c0f 100644 --- a/.pipelines/applyXamlStyling.ps1 +++ b/.pipelines/applyXamlStyling.ps1 @@ -117,8 +117,10 @@ else { Write-Error 'XAML Styling is incorrect, please run `.\.pipelines\applyXamlStyling.ps1 -Main` locally.' } - - Write-Output "Last exit code was $lastExitCode" + if ($lastExitCode -lt 0) + { + Write-Error "Error running dotnet tool run, with the exit code $lastExitCode. Please verify logs and running environment." + } # Return XAML Styler Status exit $lastExitCode } diff --git a/.pipelines/verifyNugetPackages.ps1 b/.pipelines/verifyNugetPackages.ps1 index 1fcc5237f0..54d0137121 100644 --- a/.pipelines/verifyNugetPackages.ps1 +++ b/.pipelines/verifyNugetPackages.ps1 @@ -8,6 +8,12 @@ Write-Host "Verifying Nuget packages for $solution" dotnet tool restore dotnet consolidate -s $solution +if ($lastExitCode -ne 0) +{ + $result = $lastExitCode + Write-Error "Error running dotnet consolidate, with the exit code $lastExitCode. Please verify logs and running environment." + exit $result +} if (-not $?) {