mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Have the script show error on dotnet tool failure
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 $?)
|
||||
|
||||
Reference in New Issue
Block a user