Skip to content

Commit 466b04c

Browse files
committed
Fixed Syntax issue in the test script
1 parent bc3cdb0 commit 466b04c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Tests/Engine/CustomizedRule.tests.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ if (!(Get-Module PSScriptAnalyzer) -and !$testingLibraryUsage)
99
# Force Get-Help not to prompt for interactive input to download help using Update-Help
1010
# By adding this registry key we turn off Get-Help interactivity logic during ScriptRule parsing
1111
$null,"Wow6432Node" | ForEach-Object {
12-
try
13-
{
14-
Set-ItemProperty -Name "DisablePromptToUpdateHelp" -Path "HKLM:\SOFTWARE\$($_)\Microsoft\PowerShell" -Value 1 -Force
15-
}
16-
catch
17-
{
18-
# Ignore for cases when tests are running in non-elevated more or registry key does not exist or not accessible
12+
try
13+
{
14+
Set-ItemProperty -Name "DisablePromptToUpdateHelp" -Path "HKLM:\SOFTWARE\$($_)\Microsoft\PowerShell" -Value 1 -Force
15+
}
16+
catch
17+
{
18+
# Ignore for cases when tests are running in non-elevated more or registry key does not exist or not accessible
19+
}
1920
}
2021

2122
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path

0 commit comments

Comments
 (0)