Skip to content

Commit

Permalink
Remove old errors from end of invokeErrors list.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkeithhill committed Jan 25, 2017
1 parent db10612 commit 8887fa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Utils.ps1
Expand Up @@ -43,7 +43,7 @@ function Invoke-Utf8ConsoleCommand([ScriptBlock]$cmd) {
$numNewErrors = $global:Error.Count - $errorCount
$invokeErrors.InsertRange(0, $global:Error.GetRange(0, $numNewErrors))
if ($invokeErrors.Count -gt 256) {
$invokeErrors.RemoveRange(0, ($invokeErrors.Count - 256))
$invokeErrors.RemoveRange(256, ($invokeErrors.Count - 256))
}
$global:Error.RemoveRange(0, $numNewErrors)
}
Expand Down

0 comments on commit 8887fa4

Please sign in to comment.