Skip to content

Commit

Permalink
Minor update for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Nov 10, 2021
1 parent 0ada93e commit 96e99b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utilities/resourceRemoval/helper/Remove-Resource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function Remove-Resource {
$currentRetry = 1
$resourcesToRetry = $resourceToRemove
if ($PSCmdlet.ShouldProcess(("[{0}] Resource(s) with a maximum of [$removalRetryLimit] attempts." -f $resourcesToRetry.Count), 'Remove')) {
while (($resourcesToRetry = Remove-ResourceInner -resourceToRemove $resourcesToRetry -Verbose).Count -gt 0 -and $currentRetry -le $removalRetryLimit) {
while ($resourcesToRetry.Count -gt 0 -and $currentRetry -le $removalRetryLimit) {
$resourcesToRetry = Remove-ResourceInner -resourceToRemove $resourcesToRetry -Verbose
Write-Verbose ('Re-try removal of remaining [{0}] resources. Waiting [{1}] seconds. Round [{2}|{3}]' -f $resourcesToRetry.Count, $removalRetryInterval, $currentRetry, $removalRetryLimit)
$currentRetry++
Start-Sleep $removalRetryInterval
Expand Down

0 comments on commit 96e99b7

Please sign in to comment.