diff --git a/Utils/Clean-RscSdk.ps1 b/Utils/Clean-RscSdk.ps1 index a89b29994..f4d138f39 100644 --- a/Utils/Clean-RscSdk.ps1 +++ b/Utils/Clean-RscSdk.ps1 @@ -9,18 +9,18 @@ Set-Location $PSScriptRoot\.. if (-Not $KeepOutputDir) { if (Test-Path -Path .\Output) { - Remove-Item -Recurse -Force .\Output + Remove-Item -Recurse -Force .\Output -ErrorAction Stop } if (Test-Path -Path .\Output.Release) { - Remove-Item -Recurse -Force .\Output.Release + Remove-Item -Recurse -Force .\Output.Release -ErrorAction Stop } if (Test-Path -Path .\Output.Publish) { - Remove-Item -Recurse -Force .\Output.Publish + Remove-Item -Recurse -Force .\Output.Publish -ErrorAction Stop } } Get-ChildItem -Path . -Recurse -Directory | Where-Object { $_.Name -ieq "obj" -or $_.Name -ieq "bin" -} | Remove-Item -Force -Recurse +} | Remove-Item -Force -Recurse -ErrorAction Stop Get-ChildItem -Path . -Recurse | Where-Object { $_.Name -ieq "testResults.xml" -or $_.Name -ieq "tmp_help" -} | Remove-Item -Force -Recurse +} | Remove-Item -Force -Recurse -ErrorAction Stop