diff --git a/.pipelines/applyXamlStyling.ps1 b/.pipelines/applyXamlStyling.ps1 index 8a9dd1b1df..8a6975ed0b 100644 --- a/.pipelines/applyXamlStyling.ps1 +++ b/.pipelines/applyXamlStyling.ps1 @@ -40,6 +40,12 @@ Write-Output "Use 'Help .\applyXamlStyling.ps1' for more info or '-Main' to run Write-Output "" Write-Output "Restoring dotnet tools..." dotnet tool restore --disable-parallel --no-cache +if ($lastExitCode -ne 0) +{ + $result = $lastExitCode + Write-Error 'Error running dotnet tool. Please verify the environment the script is running on.' + exit $result +} if (-not $Passive) { diff --git a/.pipelines/verifyNugetPackages.ps1 b/.pipelines/verifyNugetPackages.ps1 index 1fcc5237f0..bf22aab7a3 100644 --- a/.pipelines/verifyNugetPackages.ps1 +++ b/.pipelines/verifyNugetPackages.ps1 @@ -7,6 +7,13 @@ Param( Write-Host "Verifying Nuget packages for $solution" dotnet tool restore +if ($lastExitCode -ne 0) +{ + $result = $lastExitCode + Write-Error 'Error running dotnet tool. Please verify the environment the script is running on.' + exit $result +} + dotnet consolidate -s $solution if (-not $?)