add: test number to Get-TestError output

This commit is contained in:
DrIOS
2024-08-04 13:49:13 -05:00
parent d7d16ff0b5
commit 9e3058add4
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@@ -17,3 +17,4 @@ node_modules
package-lock.json
Aligned.xlsx
test-gh1.ps1
ModdedModules/*

View File

@@ -27,7 +27,7 @@ function Get-TestError {
$script:FailedTests.Add([PSCustomObject]@{ Rec = $recnum; Description = $description; Error = $LastError })
# Call Initialize-CISAuditResult with error parameters
$auditResult = Initialize-CISAuditResult -Rec $recnum -Failure
Write-Verbose "An error occurred during the test: `n$LastError" -Verbose
Write-Verbose "An error occurred during the test $recnum`: `n$LastError" -Verbose
return $auditResult
}