Skip to content

Commit 25ba9bd

Browse files
author
kborle
committed
Fixes customRulePath parameter in library test
1 parent 900de11 commit 25ba9bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/Engine/LibraryUsage.tests.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ function Invoke-ScriptAnalyzer {
3939
[switch] $SuppressedOnly
4040
)
4141
[string[]]$customRulePathArr = @($CustomRulePath);
42-
$scriptAnalyzer = New-Object "Microsoft.Windows.PowerShell.ScriptAnalyzer.ScriptAnalyzer"
42+
if ($CustomRulePath -eq $null)
43+
{
44+
$customRulePathArr = $null;
45+
}
46+
47+
$scriptAnalyzer = New-Object "Microsoft.Windows.PowerShell.ScriptAnalyzer.ScriptAnalyzer";
4348
$scriptAnalyzer.Initialize(
4449
$runspace,
4550
$testOutputWriter,

0 commit comments

Comments
 (0)