From 97e1f06096a0861f4c9d121c5f211373ff4cf590 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Mon, 14 Oct 2024 11:03:40 +0100 Subject: [PATCH] Retry adding some errors --- .pipelines/applyXamlStyling.ps1 | 6 ++++-- .pipelines/verifyNugetPackages.ps1 | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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 $?) {